Need help with spawn engine
			3 posts			 • Page 1 of 1		
	
Need help with spawn engine
I did spawn the engine, but at a high speed transport the ball flies out of the engine. 
To avoid this, I put "vel" in script:
spawner code:
and it does`t work
sorry for bad English, I used a translator
							To avoid this, I put "vel" in script:
- Code: Select all
 (e)=>{
scene.my.xv = vel(0); scene.my.yv = vel(1) }
spawner code:
- Code: Select all
 (e)=>{
scene.addcircle({ radius := 0.5; density = 100000; pos := e.pos; collideset := 5; heterocollide := true; vel := [scene.my.xv, scene.my.yv] }) }
and it does`t work
sorry for bad English, I used a translator
- Attachments
 - 		
 enginebug.phz- (451.56 KiB) Downloaded 47 times
 
 
- alex55
 - Posts: 3
 - Joined: Tue Feb 23, 2010 7:58 pm
 
Re: Need help with spawn engine
That's because you have to make velocity calculation on your own. It's not implemented in algodoo so you can't just type in vel(0) and vel(1). They don't exist.
			
- 
				

KarateBrot - Posts: 825
 - Joined: Mon Aug 31, 2009 7:32 pm
 - Location: Germany
 
Re: Need help with spawn engine
try setting vel in relation to normal like this:
e)=>{
scene.addcircle({ radius := 0.5; density = 100000; pos := e.pos; collideset := 5; heterocollide := true; vel := (e.normal * (some number))
you'll need to figure out how the 'some number' affects the velocity. I constantly have to adjust for objects going the absolute opposite direction that I want them to, the first time i fire up the sim.
			
		e)=>{
scene.addcircle({ radius := 0.5; density = 100000; pos := e.pos; collideset := 5; heterocollide := true; vel := (e.normal * (some number))
you'll need to figure out how the 'some number' affects the velocity. I constantly have to adjust for objects going the absolute opposite direction that I want them to, the first time i fire up the sim.
- itsallinyourhead
 - Posts: 3
 - Joined: Thu Jul 01, 2010 5:26 am
 
			3 posts			 • Page 1 of 1		
	Who is online
Users browsing this forum: No registered users and 3 guests



