Is it possible to change the Physics Constraint Angular Rotation Offset in runtime using blueprint or C++? I’m trying to simulate a vehicle completely through physics and I need this for front wheel movement. I know I can use the vehicle movement or fake it through animation system but I’m sorta crazy to do it through physics.
I am having the same question. Can we access “Angular Rotation Offset” parameter of a physics constraint with Blueprints ?
I found this https://answers.unrealengine.com/questions/160044/modify-angular-rotation-offset-at-runtime.html?sort=oldest
So basically the answer is “no, you can’t” because this property is set only at initialization.
You are right. How ever I was able to solve the problem with two joints on each wheel.
Maybe you could elaborate a bit, how you did it? I’m in a very similar situation, and currently am trying to work out a way to do this.
Simply use two joints on each front wheel. one is for motor and suspension the other is for steering.
After a lot of hours spent on the matter, I actually went ahead with the raycast solution. I built my own raycast wheel class, using sphere trace instead of raytrace for the wheel to collide properly with obstacles. I found this video on the matter VERY usefull Space Dust Racing UE4 Arcade Vehicle Physics Tour - YouTube
You can actually do a lot more with raycast. In my case I simulate each wheel separetly. After a while of tinkering I ended up with this:
And then just snapped wheel models to the trace result transform, and animated them.
Works like a charm with all kinds of obstacles.
Thats awesome. well I finally did it using the physics engine.
However the suspension damper is currently none existent so my car looks a bit bouncy. I’m gonna use forces and raycasting to implement it. Cheers to space dust racing guys.