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: BodyThrust for Grenade? o.O

Previous Thread :: Next Thread 
Kapitanovas is not online. Kapitanovas
Joined: 09 Sep 2012
Total Posts: 4216
16 Jul 2015 05:12 PM
When I was playing Phantom Forces a few mins ago, I noticed that when I died and threw my grenade at the same moment, I open Console and saw something about BodyThrust, does lito actually use BodyThrust for grenades? o.O if yes then why?

"My Life is going Good... but..."
Report Abuse
Trioxide is not online. Trioxide
Joined: 29 Mar 2011
Total Posts: 32902
16 Jul 2015 05:14 PM
I don't know. Ask the guy himself.
Report Abuse
iiEssence is not online. iiEssence
Joined: 18 Jun 2014
Total Posts: 3467
16 Jul 2015 05:15 PM
Why not is a better question


I don't need a siggy
Report Abuse
Alyte is not online. Alyte
Joined: 24 Oct 2011
Total Posts: 10090
16 Jul 2015 05:20 PM
its just one method of doing it. you could also just set velocity, or use bodyvelocity, whatever.
Report Abuse
Kapitanovas is not online. Kapitanovas
Joined: 09 Sep 2012
Total Posts: 4216
16 Jul 2015 05:26 PM
Trio, I would, but he hardly ever answers :/

iiE, and, em, plz give me a good reason why to use it?

"My Life is going Good... but..."
Report Abuse
iiEssence is not online. iiEssence
Joined: 18 Jun 2014
Total Posts: 3467
16 Jul 2015 05:28 PM
http://wiki.roblox.com/index.php?title=API:Class/BodyThrust

"allows you to specify an offset from the center of the part to apply the force"

It's very useful for projectiles


I don't need a siggy
Report Abuse
Kapitanovas is not online. Kapitanovas
Joined: 09 Sep 2012
Total Posts: 4216
16 Jul 2015 05:32 PM
yeah, but I wouldn't really pick that as my first option :/
I'd really a lot more on BodyVelocity I'd say, or even the Part's own Velocity...

"My Life is going Good... but..."
Report Abuse
iiEssence is not online. iiEssence
Joined: 18 Jun 2014
Total Posts: 3467
16 Jul 2015 05:35 PM
BodyVelocity is easier to use, but I personally prefer BodyThrust since its more accurate physics-wise. But BodyThrust does require a bit of math to use (unless you are doing trial and error)


I don't need a siggy
Report Abuse
Kapitanovas is not online. Kapitanovas
Joined: 09 Sep 2012
Total Posts: 4216
16 Jul 2015 05:41 PM
more accurate? hmmm... ah well...
but em... well lemme see...
how would u recommend calculate the TargetPos to where the Grenade should fly?
Grenade.CFrame:pointToObjectSpace(TargetPos)?
and then mutliply the .unit by the speed...

"My Life is going Good... but..."
Report Abuse
EchoEndlessly is not online. EchoEndlessly
Joined: 26 May 2015
Total Posts: 345
16 Jul 2015 05:56 PM
Why would you use body velocity for a grenade throw? The simplest grenades use normal velocity.
Report Abuse
Kapitanovas is not online. Kapitanovas
Joined: 09 Sep 2012
Total Posts: 4216
16 Jul 2015 06:03 PM
no I mean if u were to use segmented raycasting to pick the next targetPos for where the grenade should fly...

"My Life is going Good... but..."
Report Abuse
EchoEndlessly is not online. EchoEndlessly
Joined: 26 May 2015
Total Posts: 345
16 Jul 2015 06:15 PM
that makes no sense it's a grenade, just send it into an arc with normal velocity & use a touched event
Report Abuse
Kapitanovas is not online. Kapitanovas
Joined: 09 Sep 2012
Total Posts: 4216
16 Jul 2015 06:18 PM
well I would, but
1. Pros use raycasting.
2. With physics it might fly weirdly.
3. Touched event doesn't always fire sadly.
4. If there's huge lag in the server then the physics will be delayed and laggy.
5. I love the way the grenade follows ur specified arch, looks so awesome :')

"My Life is going Good... but..."
Report Abuse
EchoEndlessly is not online. EchoEndlessly
Joined: 26 May 2015
Total Posts: 345
16 Jul 2015 06:21 PM
If you're going to CFrame a grenade through the air with detection physics, you'd might as well make it a sticky grenade. Unless you think you have the math skills to make it bounce off of anything it hits (and continue downward), I'd suggest just either normal velocity, or using body thrust.
Report Abuse
Kapitanovas is not online. Kapitanovas
Joined: 09 Sep 2012
Total Posts: 4216
16 Jul 2015 06:23 PM
another person for body thrust o.O
tell me then, how should I properly calculate the direction of the Force?
was my guess correct?

"My Life is going Good... but..."
Report Abuse
EchoEndlessly is not online. EchoEndlessly
Joined: 26 May 2015
Total Posts: 345
16 Jul 2015 06:30 PM
part.CFrame * CFrame.new(0, 0, 1)

I haven't ever used BodyThrust before, but I'd assume that the location should be set to what I put above to propel the object forward (if the grenade is facing directly toward the direction).

I don't know how the force is supposed to work. I thought force was supposed to be a umber that would determine how fast the object gets propelled. I don't know how that's supposed to work if it's in object coordinates
Report Abuse
Kapitanovas is not online. Kapitanovas
Joined: 09 Sep 2012
Total Posts: 4216
16 Jul 2015 06:34 PM
oh lol XD
then why did u pick it? XDDD

"My Life is going Good... but..."
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