Swapping between two physics systems

Avatar
Soundlogic
169 Posts
Posted Jun 15, 2011
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?
Advertisement
Registered users don’t see ads! Register now!
Avatar
Omnicoder
299 Posts
Posted Jun 15, 2011
Replied 30 minutes later
Use prop_physics and parent to train.
Avatar
mbortolino
10 Posts
Posted Jun 15, 2011
Replied 2 hours later
yup what he said - just make sure to have your physics object motion disabled when parenting to stop it glitching
Avatar
Soundlogic
169 Posts
Posted Jun 15, 2011
Replied 33 minutes later
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
Avatar
p0rtalplayer
1,366 Posts
Posted Jun 15, 2011
Replied 22 minutes later
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.
Avatar
Vordwann
767 Posts
Posted Jun 15, 2011
Replied 2 minutes later
Can we get some screenshots of what you're trying to do?
Avatar
Soundlogic
169 Posts
Posted Jun 15, 2011
Replied 51 minutes later
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.
Avatar
msleeper
4,136 Posts
Admin
Posted Jun 15, 2011
Replied 6 minutes later
You could try having a prop_dynamic parented to the train, have it start Disabled and when the cube goes into a trigger area, kill the real cube and activate the prop. Good luck getting that to be smooth and not incredibly obvious to the player, though.

Could you elaborate on what exactly you're trying to do more? I can't think of anything where this would be a good idea.

Avatar
Soundlogic
169 Posts
Posted Jun 15, 2011
Replied 6 minutes later
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.
Avatar
Omnicoder
299 Posts
Posted Jun 15, 2011
Replied 1 minute later
You can move the train back to the cube by parenting a track to it and teleporting the train to it.
Avatar
The Irate Pirate
236 Posts
Posted Jun 15, 2011
Replied 22 minutes later

Soundlogic wrote:
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.

Companion Cube Weeping Angel.

Avatar
Soundlogic
169 Posts
Posted Jun 15, 2011
Replied 1 hour later
@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?
Avatar
Vordwann
767 Posts
Posted Jun 15, 2011
Replied 1 hour later
Parent one of the tracks to the cube and one of them to the player? Maybe?
Avatar
Soundlogic
169 Posts
Posted Jun 15, 2011
Replied 10 minutes later
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.
Avatar
Vordwann
767 Posts
Posted Jun 15, 2011
Replied 20 minutes later
Hmm the transition sounds messy in general, as Msleeper stated earlier.
Avatar
Soundlogic
169 Posts
Posted Jun 16, 2011
Replied 12 hours later
Well, as usual omnicoder seems to have the best idea, but how do I teleport the train to the cube?
Avatar
Soundlogic
169 Posts
Posted Jun 18, 2011
Replied 2 days later
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
Avatar
Soundlogic
169 Posts
Posted Jun 20, 2011
Replied 1 day later
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
Avatar
{SOAP} Pm@c
34 Posts
Posted Jun 20, 2011
Replied 6 hours later

Soundlogic wrote:
@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?

You are so sadistic! Weeping angels freak the crap out of me!

Cant wait to play your map if you ever get it working!

Sorry I don't know how to make the cube teleport. But at least I bumped your thread for you :smile:.

Advertisement
Registered users don’t see ads! Register now!
Avatar
Soundlogic
169 Posts
Posted Jun 23, 2011
Replied 2 days later
Help? Please? How do I teleport the train to the cube?
Thank You,
Sound Logic