How to smoothly re-oreient vehicle

Hi there,

I’m working on a very simple vehicle AI which tries to run down the player. But some times the vehicles collide to each other and are launched in air a bit and land upside down or sideways … refer image for that.

  • I’ve tried Finterp and setting it to rotation per tick but the vehicles flicker and sometimes fly off the map(due to physics enabled mayb)
  • Tried increasing angular damping to around 100- 500 … but still vehicles fly around.
  • Also tried adding impulse but either impulse is too weak or too strong which makes the cars jus snap to ground

Is there any other way to do? and i’m developing for mobile platform so would prefer performance efficient technique
Thanx in advance …

I suppose it is safe to assume you do not want to force a transform on the object and say drop it from above with a corrected rotation?

This seems to me acceptable given your game design perhaps?

If you are looking to rotate it and get along with the physics system, that will be a different matter. Still feasible, let me see here…

You can surely do it by adjusting the required parameters to the system to allow it to slip easily and use far less force to force a move on it. I have not played with doing that yet tho.

I just tried this on my configuration.

I was able to get pretty smooth results by simply using RInterpTo combined with set actor rotation I have the ‘Teleport Physics’ checked and it seems to work really nice.

So I simply implemented reset for the vehicle, where I force it to over time correct the rotation to an empty rotation.

I can jus spawn it with correct orientation given the current style and theme of game. But I was trying to jus reorient the car similar to the game in which cars jus get on wheels by themselves(in a racing game maybe).

even if I considered to spawn the car with correct rotation, how do I detect that after spawning, it will not overlap with something. As in the image, if I spawned the car again, it will get into house walls.

you can do a box trace where you want to put it and shift the result by any collision information you detect. Because yes, the teleport below may also act funny with local geometry collisions. Didn’t test that.

But the below does do a nice slow rotation that you can tweak as desired, just need to verify how it acts against collision with teleport enabled.