how to change velocity on collide?
5 posts • Page 1 of 1
how to change velocity on collide?
title says it...
so is it like
or any other suggestions???
is speed vel, veocity, speed, v or what else?????????????
so is it like
- Code: Select all
onCollide = (e)=>{e.other.vel = [(x)speed,(y)speed]}
or any other suggestions???
is speed vel, veocity, speed, v or what else?????????????
- matt28
- Posts: 7
- Joined: Wed Dec 23, 2009 11:19 pm
Re: how to change velocity on collide?
You cannot change the velocity of a preexisting object. You can, however, change the velocity of an object if you spawn it.
-

standardtoaster - Posts: 606
- Joined: Mon Aug 31, 2009 7:57 pm
Re: how to change velocity on collide?
matt28 wrote:title says it...
so is it like
- Code: Select all
onCollide = (e)=>{e.other.vel = [(x)speed,(y)speed]}
or any other suggestions???
is speed vel, veocity, speed, v or what else?????????????
You can see all properties names in .phn file. You can't access vel or pos directly (even for read) so only way to change speed - kill object (set density=0 for example) and spawn same new one with speed you need.
Dream of Algodoo as game development engine...
-

Kilinich - [Best bug reporter 2010]
- Posts: 2098
- Joined: Mon Aug 31, 2009 8:27 pm
- Location: South Russia
Re: how to change velocity on collide?
you can access vel or pos using the grady's new method.
Jrv wrote:TC42 wrote:Quite honestly, I didn't think anyone on 4chan has that good a use of grammar, spelling, usage, mechanics, ect.
But I've never been there, so I may be wrong.
GTFO newfgt
-

RA2lover - Posts: 607
- Joined: Mon Aug 31, 2009 8:43 pm
- Location: Brazil
Re: how to change velocity on collide?
it's not possible 
- jessebax129
- Posts: 34
- Joined: Tue Jan 05, 2010 6:32 pm
5 posts • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 2 guests



