Spherical Gravity Zone Movement Issue

AntL

Member
Hi there, I have a question about the above. I'm trying to turn on a gravity zone, when a projectile hits a surface.

In my test scene, I have a floor and a wall(red) with the Nolan prefab (pulled out of demo scene with the align to gravity ability). On firing an arrow at the wall, I've used the OnDamageEvent to activate the Gameobject (called Im Activated when an arrow hits me) with the spherical gravity zone script/sphere collider attached. This works as expected as Nolan gets pulled towards the wall and lands the correct orientation.

The issue I'm having is movement when Nolan lands on the red wall (2.png). When I try to move forward, ('w'), he looks down, while ('s') looks up and he leans towards the floor, rather than actual forward movement (he stays stationary and plays a rather messed up walk anim). The look functions on the mouse seem fine, and he jumps up in the correct direction - it's just his movement. Any ideas where I'm going wrong? Thanks!
 

Attachments

  • 1.PNG
    1.PNG
    468.7 KB · Views: 7
  • 2.PNG
    2.PNG
    491.9 KB · Views: 7
The spherical gravity zone isn't meant to be used on a flat surface so I would either try subclassing and creating your own gravity zone or use the Align to Normal ability.
 
Top