PDA

View Full Version : Having problems with physics in the background.



rlmergeuser
04-26-2012, 09:26 AM
The Scene
I have created a section of my track in which a rail way car has derailed and spewed beams all over the road which you jump. You see the car about 100m down track and the explosoin which "knocks" it off track as you climb some obstacles while going more or less down hill. As you come to the intersection the train collides, the debris spills on the driving line as you jump and clear it all.

The setup
A train car is positioned about 100m perpindicular to the track on a small incline. In front of the train car about 25m from the driving line is a barracade of some sort. On the train car, is debris with the physics active and so the debris is not touching anything (and i mean anything, no weird collisions). Glued to the train car is a physics/directional force. The directional force is targeted to the barrier and centered at the back of the train car. I negated wheels by changing the frictions of surfaces at different intervals to make the whole animation look correctly.

The problem
With the physics active on the train car and the debris, in the editor it all works perfectly when i toggle the physics on and off. Then I turn the physics off, on the train car and the debris, connect it all to a physics event and then attach that to an area trigger about 100m down track. When I test and go through the trigger, I can instantly see that nothing at all has happened and I can see it all the way to the jump that everything is frozen. My understanding is that I might be able to fix this using the physics bubble but I dont want to expand it past 20m. Also I was thinking that maybe the directional force doesnt know what to do with the object with physics disabled on the train car so when it toggles through the physics event it just freezes. Or maybe its even toggling the phsyics on the directional force since its glued to the train car and it falls and doesnt apply any force to the train car. Either way I am stupmed. What do I do to fix this or must I scrap all the time it took to make this awesome set of track? IT WILL BE BIBLICAL ... if I can get it to work. Please, please help!

CuBNI
04-26-2012, 09:35 AM
The rider has a red box (i think, sorry not at xbox at mo) attached to him that is the "physics bubble", objects with physics will only animate within this "bubble" so if your too far away it wont matter if its active or not.

Can you move the animated parts/bits closer to trigger/rider ?
Sometimes ive found i dont even need a trigger/event etc as leaving the physics on the item on by default means as the rider gets closer they will animate themselves (eg make a few energy drink tins hover just above a tilted panel, when you get close enough the tins will animate and fall down the panel without the need for a trigger/event etc)

rlmergeuser
04-26-2012, 09:41 AM
The rider has a red box (i think, sorry not at xbox at mo) attached to him that is the "physics bubble", objects with phyrics will only animate within this "bubble" so if your too far away it wont matter if its active or not.

Then how does redlynx do the extreme track with the police cars chasing the other cars? Those start way off the driving line. Plus, how much can I expand the physics bubble? Can I do it dynamically. I didnt see a way to tie that value to a variable data source. My understanding is that when your physics bubble is too large your game runs poorly so How could I expanded it just for that scene?

CuBNI
04-26-2012, 09:43 AM
not sure what part your talking about but id assume the object position tool and just make them move on fixed "rails" using X, Y and Z coordinates.
Not sure on the expanding decreasing of physics bubble, ive tried not to mess with it as i have a little slow down at times as it is.

rlmergeuser
04-26-2012, 09:48 AM
not sure what part your talking about but id assume the object position tool and just make them move on fixed "rails" using X, Y and Z coordinates.
Not sure on the expanding decreasing of physics bubble, ive tried not to mess with it as i have a little slow down at times as it is.

Thats a very good idea. The object position tool, can I simply pick 2 points to have the train car travel on, smoothly? I must admit I am learning as I am going and so far I think i've done damn well but now that I realize some of the stuff I can pull off im unfamiliar with some of the more intricate tools. How exactly would I use that on an incline because that train car path is not just on the x or y axis. It traverses all 3 the way its angled.

CuBNI
04-26-2012, 09:54 AM
Yeah movements like that are gonna require using dummy objects as your start and end points then using 3 value collectors (maybe 6 if you want rotations aswell) for each to get their X, Y and Z coordinates then hook these up to a curve(s) of some type (depends on movement required) which is attached to an object position tool being hit with impulses 1 every tick (thus keeping 60 ticks a second so nice and smooth). Check out the tutorial videos as these give a good example of what ive said above.

http://www.youtube.com/watch?v=5Par5zpjiFQ

Yeah im just really mucking about at present and testing how stuff works and what i can and cant do. Hopefully will have my first trials track up within a few days though.

rlmergeuser
04-27-2012, 05:31 AM
I see. Basically have position indicators at start and end point. Then use an operator with ticks to gradually increase the x,y and z positions to get a gradual change from start to finish. Are you sure this will activate even outside the physics bubble? I read some other topics and other people are having issues with effects in the background, physics related of not.

Either way thanks for the help I am sure I will spend another 6 hours figuring it out but at least I have a solution to try out. I just wish there was a way to easily have physics be active that far off track. Im telling you this scene is a thing of beauty. I had to mess with the friction and physics of so much crap to get it to look authentic. It will be a shame to start from scratch.

CuBNI
04-27-2012, 09:43 AM
Yeah it should work fine, i was messing about and got some objects moving about in the distance behind my track. still need to play about though as its a lot of effort to make things move in a natural looking way rather than hovering ghost objects LOL

Good luck and ill try and keep an eye out for your track !

just uploaded my first track yesterday which took me about 14 hours ! (although a lot of that was checking out what pieces where available LOL)
Has lots going on and some alternate routes (including afterburner flying)

GT - oXCuBXo
Name - Afterworld
Type - Trials
Difficulty - Medium
Tags - Realistic, Jumps, Physics, Scenic