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

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?

Thanks.
Reply
#2
Hi

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.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to assign a Volume to a controller at runtime using API _Aka_ 0 4 07-19-2022, 11:17 AM
Last Post: _Aka_
  Can I change splines directly on runner controller via script? sikamaru 1 10 03-12-2022, 08:40 PM
Last Post: _Aka_
  Spline controller orientation itsGama 4 27 01-24-2022, 06:38 PM
Last Post: _Aka_
  Controller/Spline flipping object topquarkone 4 359 10-28-2021, 05:02 PM
Last Post: _Aka_

Forum Jump: