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: CFraming a Bullet

Previous Thread :: Next Thread 
Kapitanovas is not online. Kapitanovas
Joined: 09 Sep 2012
Total Posts: 4216
07 Dec 2014 04:49 PM
any Suggestions for me? the Unioned Part's Front Face is the Side, so the Bullet goes sideways :/
Report Abuse
suremark is not online. suremark
Joined: 13 Nov 2007
Total Posts: 6315
07 Dec 2014 04:51 PM
If the front face is the side, then shift it along the X axis.
Report Abuse
Kapitanovas is not online. Kapitanovas
Joined: 09 Sep 2012
Total Posts: 4216
07 Dec 2014 05:01 PM
u mean the Position??? that wouldnt do nothin :P I need Rotation Technique
Report Abuse
suremark is not online. suremark
Joined: 13 Nov 2007
Total Posts: 6315
07 Dec 2014 05:24 PM
Obviously you'd use CFrames :P Here--

  Part.CFrame = Part.CFrame * Vector3.new(1, 0, 0)

will shift the Part one stud to the right along its local axis.

For a bullet, I'd recommend simply setting the velocity of Part. You'd have to be a little more clever to do that properly, though:

  Part.Velocity = Part.CFrame:vectorToWorldSpace(Vector3.new(1, 0, 0))

That takes (1, 0, 0) and puts it relative to Part's orientation.
Report Abuse
Kapitanovas is not online. Kapitanovas
Joined: 09 Sep 2012
Total Posts: 4216
07 Dec 2014 05:30 PM
wat u mean orientation?
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
07 Dec 2014 05:30 PM
Rotation
Report Abuse
Kapitanovas is not online. Kapitanovas
Joined: 09 Sep 2012
Total Posts: 4216
07 Dec 2014 05:35 PM
am confused now
Report Abuse
suremark is not online. suremark
Joined: 13 Nov 2007
Total Posts: 6315
07 Dec 2014 05:42 PM
Okay, well, suppose I have a part sitting on top of the baseplate, and that it were rotated 45 degrees westward. If I were to set its velocity to (0, 0, -1) (which is forward), it would move a bit forward relative to the baseplate, so straight north.
If I did Part.CFrame*Vector3.new(0,0,-1), then it would move 45 degrees northwest, because from Part's point of view, that would be directly north.
Report Abuse
Kapitanovas is not online. Kapitanovas
Joined: 09 Sep 2012
Total Posts: 4216
08 Dec 2014 11:49 AM
tnx a ton! I see now! I put the Hinge on front surface so I can see it, then I used
workspace.Part.Velocity = workspace.Part.CFrame*Vector3.new(-100,0,0) and the Part actually did go to the left! I even tried it with the (0, 0, -100) and rotating it to see if there are any changes... did Roblox do something??? cos it used to be so that u had to give the Position the Part would Fly to :/
Report Abuse
JDrax is not online. JDrax
Joined: 19 Feb 2010
Total Posts: 2140
08 Dec 2014 12:36 PM
get dat bullet drop dude


from lmad
Report Abuse
Kapitanovas is not online. Kapitanovas
Joined: 09 Sep 2012
Total Posts: 4216
08 Dec 2014 01:45 PM
I am :P if u set maxForce on BodyVelocity not to Infinity then it will work normally...
Report Abuse
Kapitanovas is not online. Kapitanovas
Joined: 09 Sep 2012
Total Posts: 4216
08 Dec 2014 02:03 PM
wait a sec :/
b.CFrame = handle.CFrame + Vector3.new(0, 0.5, 0), mouse.Hit.p
b.Rotation = Vector3.new(100, 0, 0)
local bv = b.BodyVelocity
bv.velocity = b.CFrame * Vector3.new(0, bs.Value, 0)
just shoots the Bullet in the same direction :/
Report Abuse
Kapitanovas is not online. Kapitanovas
Joined: 09 Sep 2012
Total Posts: 4216
08 Dec 2014 03:20 PM
anything wrong I did? :/
Report Abuse
Kapitanovas is not online. Kapitanovas
Joined: 09 Sep 2012
Total Posts: 4216
16 Dec 2014 03:57 PM
I'll try it again
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