Posts: 2
Threads: 1
Joined: Apr 2024
Consider In a car game, where the car drifts at corners.
Is it possible to set in curvy to directly allow these offsets instead of following in the exact path? Can you please suggest how to do with curvy?
Thanks!
Posts: 2,142
Threads: 95
Joined: Jun 2017
Hi,
This is doable via the offset settings:
https://curvyeditor.com/documentation/co...art#offset
Have a nice day.
Please consider leaving a
review for Curvy, this helps immensely. Thank you.
Available for freelance work—feel free to reach out.
Posts: 2
Threads: 1
Joined: Apr 2024
Thanks for the answer. Can you please give more details on how to achieve this? At-least a rough idea.
1. The car needs to follow the direction of the spline
2. The car when turns will have additional offset from the drift
3. The car can have varied speeds while following the spline path
Posts: 2,142
Threads: 95
Joined: Jun 2017
Hi,
First, if not already done, please get an idea of the capabilities and usage of the Spline Controller by reading the documentation page, and watching the videos included in that page.
Then, write a script that does the following:
- get the tangent of the spline where your object at, and where it was the previous frame.
- Compute the angle between these two vectors.
- Compute the turn speed based on that angle.
- Add offset to your controller depending on how high is the turn speed.
This answers the complicated part, the drift implementation.
For the rest orientation, just setup your controller properly.
For the variable speed, use the API to change the value of Speed.
Here is the relevant api reference page:
https://api.curvyeditor.com/FluffyUnderw...oller.html
Have a nice day
Please consider leaving a
review for Curvy, this helps immensely. Thank you.
Available for freelance work—feel free to reach out.