NEED HELP SCRIPTING
3 posts • Page 1 of 1
NEED HELP SCRIPTING
hii i need some help woith scripting, i know angle calculations and stuff, i am making a gun that shoots balls, the balls just get spawned with a velocity ( (e)=>{vel:= [300,0]; the rest} onlaserhit ) but the gun has to move (so it does) but the balls keep going straight to the right, how to i make it so it follows where the gun is pointing?
- jessebax129
- Posts: 34
- Joined: Tue Jan 05, 2010 6:32 pm
Re: NEED HELP SCRIPTING
- Code: Select all
(e)=>{vel := 300 * e.normal}
- Code: Select all
(e)=>{vel:= [10,10]; the rest}
make sure to check out my work.
-
Rideg - Posts: 948
- Joined: Tue Dec 15, 2009 5:17 pm
- Location: Östersund, Sweden
Re: NEED HELP SCRIPTING
Rideg wrote:this will send it 300 m/s at the side of the collision. Velocity is set with x and y. ex:
- Code: Select all
(e)=>{vel := 300 * e.normal}
will send it diagonally 45 degrees.
- Code: Select all
(e)=>{vel:= [10,10]; the rest}
haha okeej thanks but i found out myself today it uses the (0) and (1) between 2 variables *150 is the speed
- jessebax129
- Posts: 34
- Joined: Tue Jan 05, 2010 6:32 pm
3 posts • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 4 guests