crazyblox
|
  |
| Joined: 16 Mar 2008 |
| Total Posts: 6139 |
|
|
| 18 Mar 2012 01:15 PM |
| Im a bit of a newbie with Velocities and making them go in the front direction, ALSO, how would i move a brick infront of itself, like it doesnt matter what the angle is? |
|
|
| Report Abuse |
|
|
crazyblox
|
  |
| Joined: 16 Mar 2008 |
| Total Posts: 6139 |
|
| |
|
NXTBoy
|
  |
| Joined: 25 Aug 2008 |
| Total Posts: 4533 |
|
|
| 18 Mar 2012 03:34 PM |
| brick.Velocity = brick.CFrame * Vector3.new(0, 0, 10) |
|
|
| Report Abuse |
|
|
crazyblox
|
  |
| Joined: 16 Mar 2008 |
| Total Posts: 6139 |
|
| |
|
|
| 19 Mar 2012 04:57 PM |
| Can you multiply a CFrame by a vector? |
|
|
| Report Abuse |
|
|
| |
|
SDuke524
|
  |
| Joined: 29 Jul 2008 |
| Total Posts: 6267 |
|
|
| 19 Mar 2012 05:27 PM |
| http://wiki.roblox.com/index.php/CFrame#Operators |
|
|
| Report Abuse |
|
|
crazyblox
|
  |
| Joined: 16 Mar 2008 |
| Total Posts: 6139 |
|
|
| 20 Mar 2012 02:05 PM |
| Theres a problem with the velocity one. It says, CFrame expected, got userdata. |
|
|
| Report Abuse |
|
|
NXTBoy
|
  |
| Joined: 25 Aug 2008 |
| Total Posts: 4533 |
|
|
| 20 Mar 2012 02:31 PM |
| What do you mean? What Velocity one? |
|
|
| Report Abuse |
|
|
crazyblox
|
  |
| Joined: 16 Mar 2008 |
| Total Posts: 6139 |
|
|
| 20 Mar 2012 02:35 PM |
brick.Velocity = brick.CFrame * Vector3.new(0, 0, 10) On the vector3 part it expected CFrame. I did what output said and now it only Fly's off to one direction. |
|
|
| Report Abuse |
|
|
crazyblox
|
  |
| Joined: 16 Mar 2008 |
| Total Posts: 6139 |
|
| |
|
NXTBoy
|
  |
| Joined: 25 Aug 2008 |
| Total Posts: 4533 |
|
|
| 20 Mar 2012 02:58 PM |
| No, `brick.Velocity = brick.CFrame * Vector3.new(0, 0, 10)` will run without error. Something else is happening. |
|
|
| Report Abuse |
|
|
crazyblox
|
  |
| Joined: 16 Mar 2008 |
| Total Posts: 6139 |
|
| |
|
crazyblox
|
  |
| Joined: 16 Mar 2008 |
| Total Posts: 6139 |
|
|
| 20 Mar 2012 03:15 PM |
| There is no error, But the brick FLYS ALWAYS to one direction even with changing the velocity. Ill post a new thread and link you on here. |
|
|
| Report Abuse |
|
|
crazyblox
|
  |
| Joined: 16 Mar 2008 |
| Total Posts: 6139 |
|
|
| 20 Mar 2012 03:18 PM |
| http://www.roblox.com/Forum/ShowPost.aspx?PostID=64686415 |
|
|
| Report Abuse |
|
|
NXTBoy
|
  |
| Joined: 25 Aug 2008 |
| Total Posts: 4533 |
|
|
| 20 Mar 2012 03:23 PM |
| You need to _continually_ set the velocity. It will keep moving in one direction until you tell it to move in another. My code doesn't magically say "Always move towards the front", it says "Move towards where the front is right now". |
|
|
| Report Abuse |
|
|
SN0X
|
  |
| Joined: 24 Oct 2011 |
| Total Posts: 7277 |
|
|
| 20 Mar 2012 03:24 PM |
| Brick.Velocity = Brick.CFrame.lookVector * [number of studs/sec.] |
|
|
| Report Abuse |
|
|
crazyblox
|
  |
| Joined: 16 Mar 2008 |
| Total Posts: 6139 |
|
|
| 20 Mar 2012 03:25 PM |
| As in like, it doesnt start travelling in the direction of the kart. It involves angles in some way, i should have mentioned that at the start, |
|
|
| Report Abuse |
|
|
SN0X
|
  |
| Joined: 24 Oct 2011 |
| Total Posts: 7277 |
|
|
| 20 Mar 2012 03:26 PM |
If you want it to move strongly and continually,
local v = Instance.new("BodyVelocity") v.velocity = Brick.lookVector * numba v.maxForce = Vector3.new(100000,100000,100000) v.Parent = Brick |
|
|
| Report Abuse |
|
|
SN0X
|
  |
| Joined: 24 Oct 2011 |
| Total Posts: 7277 |
|
|
| 20 Mar 2012 03:31 PM |
| With angles, use my above example but the angular velocity object is called "BodyAngularVelocity", and change .velocity to .angularvelocity, I think. Also get rid of lookVector bit. Oh and the angularvelocity property is vector 3. |
|
|
| Report Abuse |
|
|
crazyblox
|
  |
| Joined: 16 Mar 2008 |
| Total Posts: 6139 |
|
|
| 20 Mar 2012 03:34 PM |
| Thanks for the help! Now i just need to sort out the welding parts. |
|
|
| Report Abuse |
|
|
|
| 20 Mar 2012 03:41 PM |
| Use the CFrame LookVector. |
|
|
| Report Abuse |
|
|