Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Physics Railway
#1
Hi I am interested in the asset and have seen mention of railway demo scene.

Before buying is there a demo to download of this scene?

Is it possible to apply physics forces to a train, including couple vehicles and have them follow splone?

Also how are switches/turnouts handled?

Appreciate this is not a railway asset but since it is so related to tracks I would like a better idea of how much is handled in asset vs needing custom code on top.

Thanks
Reply
#2
Hi,

1- Here is a WebGL demo you can interact with. All its content is part of the asset's unitypackage, so you can see exactly how it is done.
https://curvyeditor.com/demo
The controllers have an option defining what gets moved: the transform or the rigidbody (2d/3d):
https://curvyeditor.com/documentation/co..._component
When you select to apply the controller on the rigidbody, the code moves the object kinematically, using the RigidBody.MovePosition and MoveRotation methods. It does not apply forces. This allows for physical interactions, but not with the quality they would have if an AddForce method was used. You can see this in action in the webGL demo, by selecting the following scene: "Physics: Interactions while following following a spline"

2- The way vehicles were coupled in the demo scene was not using physics, but simply having a controller for every vehicle, and occasionally applying a position correction if we detected that a vehicle got closer or further from its neighbor vehicle.

3- Switches are visible in example scene """", and documented here:
https://curvyeditor.com/documentation/co...s_handling

You can find additional information regarding these points on the youtube channel too.
https://www.youtube.com/@toolbuddy
Feel free to ask questions if needed.

Have a nice day.
Available for freelance work, feel free to reach out: toolbuddy.net
Please consider leaving a review for Curvy, this helps immensely. Thank you.
Reply
#3
Thanks for your reply. I do really need the objects following splines to obey physics for gravity on hills, momentum, coupling physics etc so perhaps this asset would only be of use for the better management of splines and I need to write the code on top to just align rigidbodies with these splines but otherwise use physics engine.

Perhaps generate container colliders from these splines and then run rigid bodies in that 'track'

Open to suggestions, or if others have had any success with these approaches?

Thanks

(03-25-2026, 08:36 AM)_Aka_ Wrote: Hi,

1- Here is a WebGL demo you can interact with. All its content is part of the asset's unitypackage, so you can see exactly how it is done.
https://curvyeditor.com/demo
The controllers have an option defining what gets moved: the transform or the rigidbody (2d/3d):
https://curvyeditor.com/documentation/co..._component
When you select to apply the controller on the rigidbody, the code moves the object kinematically, using the RigidBody.MovePosition and MoveRotation methods. It does not apply forces. This allows for physical interactions, but not with the quality they would have if an AddForce method was used. You can see this in action in the webGL demo, by selecting the following scene: "Physics: Interactions while following following a spline"

2- The way vehicles were coupled in the demo scene was not using physics, but simply having a controller for every vehicle, and occasionally applying a position correction if we detected that a vehicle got closer or further from its neighbor vehicle.

3- Switches are visible in example scene """", and documented here:
https://curvyeditor.com/documentation/co...s_handling

You can find additional information regarding these points on the youtube channel too.
https://www.youtube.com/@toolbuddy
Feel free to ask questions if needed.

Have a nice day.
Reply
#4
You can modify the code of the controllers so that instead of moving an object to the desired position, they apply a force that pushes the object towards the desired position.
Available for freelance work, feel free to reach out: toolbuddy.net
Please consider leaving a review for Curvy, this helps immensely. Thank you.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Curvy Physics Disconnects on Mobile dcrosby 2 7,133 06-22-2018, 02:21 AM
Last Post: dcrosby
Lightbulb Collider2D Physics Apelsin 2 6,555 02-14-2016, 05:46 PM
Last Post: Jake
  Wheeled physics vehicles using curvy as path controller EFhlx 1 5,253 01-03-2016, 02:06 PM
Last Post: Jake

Forum Jump: