Spanw engine help
4 posts • Page 1 of 1
Spanw engine help
Hello, I'm trying to build a spawn engine that uses three spawners (left, right, middle). the density varies in the difference to the wanted height(scene.my.posdif = e.pos(1) - 10). It doesn't work as it should. I'm thinking that it should go pretty softly but instead it starts to jump on the cords [x, 10] until it falls down so a stabilizer function on the left and right spawners(I've tried a density changing method but it didn't work out properly). If someone could teach me how to do this I would be very thankfull.
make sure to check out my work.
-
Rideg - Posts: 948
- Joined: Tue Dec 15, 2009 5:17 pm
- Location: Östersund, Sweden
Re: Spanw engine help
Try
I'm not actually understanding what your trying to do though.
- Code: Select all
scene.my.posdif = (e.pos(1) - 10)
I'm not actually understanding what your trying to do though.
-
Mystery - Posts: 2802
- Joined: Thu Sep 03, 2009 1:16 pm
- Location: Southern Australia
Re: Spanw engine help
if i understand u correctly you want to produce a variable that controls your thrust depending on your current altitude rite?
try something along the lines of
that one should ease into whatever desired pos its looking for but might be a bit slow to get there so you can also implement a speedup system by adding
as for moving a hovering spawnengine left and right ive found that rotating the original spawner and compensating the thrust is much more stable/effective/cpu efficient, i used such system in one of my scenes
even tho the system is rather spread out all the thrust control script is in the box with "flight control" letters on it, the rest is just wiring to get the info where it needs to go and to get it applied.
try something along the lines of
- Code: Select all
desiredAltitude=<desired y location>; thrustConst=<the exact density you need to spawn in order to stay still along y axis>; spawndensity=((desiredaltitude-e.pos(1))/desiredAltitude+1)*thrustConst; spawndensity<0.01?{spawndensity=0.01}:{}
that one should ease into whatever desired pos its looking for but might be a bit slow to get there so you can also implement a speedup system by adding
- Code: Select all
desiredAltitude-e.pos(1) > 1(change to whatever scale your on)?{spawndensity=spawndensity*10}:{}
as for moving a hovering spawnengine left and right ive found that rotating the original spawner and compensating the thrust is much more stable/effective/cpu efficient, i used such system in one of my scenes
even tho the system is rather spread out all the thrust control script is in the box with "flight control" letters on it, the rest is just wiring to get the info where it needs to go and to get it applied.
- Mr_Stabby
- Posts: 155
- Joined: Wed Dec 16, 2009 12:16 am
Re: Spanw engine help
it hovers at [x, 10] and to make it not tip over I need something that could stabilize it.
make sure to check out my work.
-
Rideg - Posts: 948
- Joined: Tue Dec 15, 2009 5:17 pm
- Location: Östersund, Sweden
4 posts • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 5 guests