[Request] Physics Change Event

Hi there,

I was wondering if the devs might consider adding an “on physics change” event, such that an event could trigger when physics mode changes from walking to falling or something to that effect. Was looking through documentation and Actor.h and didn’t see anything like that in there. It was something I really would have liked to see in UE3, too.

(And yes, this is part of a larger request at wanting to have much finer control over physics this generation. :slight_smile:

Just to clarify, are you talking about state changes in the Character Movement Component specifically? We have been having lots of conversations about how to make that code more flexible and extensible!

You’ll have to pardon my ignorance about how much current physics has changed from UE3. But I’m talking about when the actor’s physics changes from PHYS_falling to PHYS_walking or whatever. I’m not finding the current enumerations for the physics states like I used to in the actor.h file… so I have to also ask how you’d be able to make on-the-fly physics changes from within code to an actor also.

I don’t know if any movement component has anything to do with that – you may have to explain some of this to me (and to others who might need help understanding the new physics system). I was speaking purely from a coding standpoint, and not so much from a blueprint one (since I prefer more the former than the latter).

But basically my request is that any time that a physics change happens at the actor level, an “on physics event” notify is generated that allows me to specifically control custom actor behavior…

If that is not how physics works now, pardon my ignorance, and I will amend my request to adapt to the new architecture.

Hi Markus,

Thank you for your feedback. I have created a report and added it into our feature request database. If there is any other feature you would like to see in a future build of Rocket, please let us know.

Thank you,

Alexander

I actually added this event on 6/5/2013, I guess it just didn’t make it to your build in time. There is now a function on Character:

OnMovementModeChanged(EMovementMode PrevMovementMode)

This existed in C++ for a while, but I added a blueprint notification as well.

Any chance of seeing this on a regular joe-shmoe actor? I would imagine all non-static actors would possess physics of their own, no? At least they did in UE3. Might be useful to do some creative physics handling on non-pawn/character actors as well…

Well we were talking about walking and falling, which are Character movement concepts now. Normal Actors don’t have walking/falling/etc physics. The character concepts are less “physics” and more “movement modes”.

There are physics events for touching and untouching objects that you can have on components, which can be on most Actors.

making the distinction between a ‘character’ and other actors, to me, will simply chain unreal to the concept of an fps creator, both in the engines perseption by potential developrs, and in the reality of working with the engine. myself, and countless others have created games with udk that do not involve a character at all. i dont know your reasoning behind character movement types but it seems slightly short sighted and very restrictive. an actor is an actor, physics is physics, be it a ‘character’ or not.

I kinda agree on both points of view.

it does make sense to have a distinction between phys_walking (which is actually active even the actor is “standing”), phys_falling, phys_interpolating, phys_rigidbody and maybe some other, for regular Actors. and for that it’d be useful to have a physics-changed event on Actor as well.

however other cases like phys_flying, phys_swimming, phys_ladder, etc, are most likely only to be used on a character.
it doesn’t really matter if the player controls a ball or just a camera (or multiple stuff like an RTS or SimCity), to me you either control some sort of character, or a camera/interface where you do other stuff. but perhaps I’m just too shortsighted to think/remember real examples of games where you might control a non-character that requires complex physics

Just to respond to Mick’s comment, we have worked to make UE4 less FPS centric, and easier to make your own physics. Rather than a hard coded enum on actor, you can implement your own ‘movement component’ or just add code to the actors tick function. Rather than have a lot of properties in Pawn that only related to a walking character, we split it out into the character subclass. If you want to make a jetski racing game, you should derive from Pawn not Character, and you have a lot less properties and functions to understand! I hope that helps give some background to the changes.