I am trying to make an object that I can swap between acting like a ordinary cube and acting like a func_tracktrain, but I can't seen to get it working. I was wondering if people have any advice?
Use prop_physics and parent to train.
yup what he said - just make sure to have your physics object motion disabled when parenting to stop it glitching
There just seems to be one problem with that though, since if I move the prop_physics when it isn't parented to the train, the train doesn't move with it, and the entire system gets an offset. I'm not sure how to fix this.
Thank You,
Sound Logic
I have no idea how well this would work, but you could try parenting them to each other, then disabling the cube's motion when the train moves.
Can we get some screenshots of what you're trying to do?
p0rtalplayer: Parenting the train doesn't seem to work, which makes sense since it is supposed to be a physics system of its own. The problem is that since they are both physics objects of their own they object to having the other try to override it.
Well, I am trying to create a cube that will move to a location by itself under some circumstances, but acts like an ordinary cube under other circumstances. The exact plan is to have a cube that will move by itself when it isn't being looked at, and kill the player on touch, but when it is being looked at is a regular cube.
You can move the train back to the cube by parenting a track to it and teleporting the train to it.
@The Irate Pirate-Yes that is exactly the idea. I'm calling it an angel cube. I think it may be even more fun in coop maps.
@Omnicoder-How do I teleport the train?
Parent one of the tracks to the cube and one of them to the player? Maybe?
Well, I'm going to be parenting the target for the train to the player, but that doesn't solve the problem of the offset created when you move the cube when it is in cube form and then let it try to move in train form.
Hmm the transition sounds messy in general, as Msleeper stated earlier.
Well, as usual omnicoder seems to have the best idea, but how do I teleport the train to the cube?
Help? It looks like I just need to know how to teleport the train to the cube. Does anyone know how to do this?
Thank you,
Sound logic
Sorry to bump, but I have looked and cannot find a solution, how do I teleport the train to the cube?
Thank You,
Sound Logic
Help? Please? How do I teleport the train to the cube?
Thank You,
Sound Logic