generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Projectile motion

Previous Thread :: Next Thread 
lskid is online. lskid
Joined: 07 Dec 2012
Total Posts: 89
01 Apr 2017 04:00 PM
So I need to launch a projectile to where the cursor is pointing, how can I do this in the Y axis only? It needs to go on a line from one part, to where the cursor points.


Lskid
Report Abuse
Protoduction is not online. Protoduction
Joined: 27 Jul 2012
Total Posts: 1054
01 Apr 2017 04:00 PM
What do you mean by in the Y axis only?
Report Abuse
graveyardposse is not online. graveyardposse
Joined: 23 Oct 2008
Total Posts: 2565
01 Apr 2017 04:01 PM
CFrame.p.Y
Report Abuse
lskid is online. lskid
Joined: 07 Dec 2012
Total Posts: 89
01 Apr 2017 04:02 PM
I already have it traveling by X and Z, but I am having trouble making it go in the Y towards it as I used a method for X and Z that wouldn't work here.


Lskid
Report Abuse
lskid is online. lskid
Joined: 07 Dec 2012
Total Posts: 89
01 Apr 2017 04:03 PM
graveyard, you have no idea what I want or how to make it happen. That will not make it go towards the part unless the projectile starts at 0,0,0


Lskid
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
01 Apr 2017 04:17 PM
As in you're given the y position and the initial y position and you want to get the y component of velocity to launch it in? i.e.:
puu DOT sh SLASH v64Lm SLASH 583e9f4608 DOT mp4
Report Abuse
graveyardposse is not online. graveyardposse
Joined: 23 Oct 2008
Total Posts: 2565
01 Apr 2017 04:19 PM
well if you're talking about an arc then you should be using a projectile formula that accounts for x,y, and z
Report Abuse
Dominical is not online. Dominical
Joined: 04 Nov 2011
Total Posts: 1303
01 Apr 2017 04:20 PM
If what you mean is that the projectile is falling while it's being launched then you need to create a force to keep it in the air. "Anti-gravity" in a way.

Here's how you would accomplish this:
local bodyForce = Instance.new('BodyForce', part)
local gravity = 196.2
bodyForce.force = Vector3.new(0, part:GetMass() * gravity, 0)
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
01 Apr 2017 04:21 PM
Oh yeah that's what he wanted woops. I just reread the thread.
Report Abuse
lskid is online. lskid
Joined: 07 Dec 2012
Total Posts: 89
01 Apr 2017 04:59 PM
I am launching a projectile from a to b

B is higher than A, so it must move up by the time it gets there...


Lskid
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
01 Apr 2017 05:00 PM
Do his force idea
and then for the y component of velocity set it to disp.Y/t
And t can be gotten from disp.X/vel.X (or disp.Z/vel.Z), the same way you had did it before
Report Abuse
lskid is online. lskid
Joined: 07 Dec 2012
Total Posts: 89
01 Apr 2017 05:02 PM
I need to calculate what the Velocity needs to be set to, stop talking if you don't know what it is you are trying to talk about


Lskid
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
01 Apr 2017 05:02 PM
I already told you. Not my fault you don't understand basic high school physics and vectors.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image