Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Outer space simple vehicle controller

I am a little struggled to build a controller that I think should be pretty simple. I have a curvy path and I need to move a vehicle along the path.

The path is in outer space, so there is no gravity and the vehicle need to be sticked/magnetized to the path.

But there is obstacles along the path like bumps and ramps that need to physically accurate affect only the local Y position and local X rotation of the vehicle.

Any suggestion how to implement a controller like that?


So you have two constraints: the object needs to be on the path, and needs to interact physically with other objects. As I see it, there are two ways to verify both constraints:

  1. Applying lightly both constraints all the time: this is what is done in example scene 11_Rigidbody, where the object is not moved along a path, but physically pushed around it. That way it interacts correctly with other objects, but will most of the time not be exactly on the path.
  2. Applying strictly only one constraint at a time: when the controlled object collides with a physical object, disable the controller and let only the physical response move the object. Then, after some condition is met (for example after reaching a certain point, or after a some time), reactivate the controller. The downside of this method is the handling of the transaction between both states, which might look unnatural.

I hope this helped
Have a nice day
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.

Possibly Related Threads…
Thread Author Replies Views Last Post
  Set Volume to the Volume Controller at Runtime pako88 2 10 04-08-2024, 03:26 PM
Last Post: _Aka_
  Add noise to spline controller movement DekoGames 2 10 02-06-2024, 01:28 PM
Last Post: DekoGames
  Controller behavior like E21_VolumeControllerInput ashuraVlad 3 11 06-22-2023, 09:26 AM
Last Post: _Aka_
  how to make fast moving controller go all the way to linear points?(curvy8) hawken 7 12 06-06-2023, 09:47 AM
Last Post: _Aka_

Forum Jump: