badfitz67
|
  |
| Joined: 03 Jun 2010 |
| Total Posts: 13165 |
|
|
| 14 Jul 2016 03:03 PM |
no I can't check distance from ground because the ground is uneven. Currently I'm checking if the Y velocity is higher than a certain point or lower than a certain point (falling)
But this is glitchy and sometimes when it isn't even going up or falling inAir is still true inAir = car.Velocity.Y > 10 and true or false or car.Velocity.Y < -1 and true or false
My baguetteometer is going off the charts |
|
|
| Report Abuse |
|
|
|
| 14 Jul 2016 03:15 PM |
--Vector3.new(0,height,0) -- The middle there is the height of an object,that probably may help you(i write "height" --there so you couldn't height so couldn't get confused...
-- that may help you idk ,if not just ignore this :P |
|
|
| Report Abuse |
|
|
|
| 14 Jul 2016 03:16 PM |
| "so you couldn't get confused"* xD i cant type today |
|
|
| Report Abuse |
|
|
badfitz67
|
  |
| Joined: 03 Jun 2010 |
| Total Posts: 13165 |
|
|
| 14 Jul 2016 04:07 PM |
did you even read the title jfc
My baguetteometer is going off the charts |
|
|
| Report Abuse |
|
|
|
| 14 Jul 2016 04:09 PM |
part:IsGrounded
should work as long as your ground is anchored
Add 13,000 posts |
|
|
| Report Abuse |
|
|
modulum
|
  |
| Joined: 11 Jul 2016 |
| Total Posts: 242 |
|
|
| 14 Jul 2016 04:10 PM |
| It would probably be better to check the position rather than velocity. Is your map just a flat map, or does it have different heights? |
|
|
| Report Abuse |
|
|
modulum
|
  |
| Joined: 11 Jul 2016 |
| Total Posts: 242 |
|
|
| 14 Jul 2016 04:10 PM |
Nevermind what I just said, Lord_Narwal's is much better. I had no idea that was even a function. |
|
|
| Report Abuse |
|
|
Ryuzoji
|
  |
| Joined: 21 Dec 2015 |
| Total Posts: 937 |
|
| |
|
|
| 14 Jul 2016 04:11 PM |
@Ryu
ikr
i found it in the API for baseparts
they add so much stuff under the radar lol
Add 13,000 posts |
|
|
| Report Abuse |
|
|
badfitz67
|
  |
| Joined: 03 Jun 2010 |
| Total Posts: 13165 |
|
|
| 14 Jul 2016 04:19 PM |
Doesn't work.
My baguetteometer is going off the charts |
|
|
| Report Abuse |
|
|
|
| 14 Jul 2016 04:20 PM |
did you try
if part:IsGrounded() == false then end
Add 13,000 posts |
|
|
| Report Abuse |
|
|
badfitz67
|
  |
| Joined: 03 Jun 2010 |
| Total Posts: 13165 |
|
|
| 14 Jul 2016 04:20 PM |
Doesn't the part have to be connected, as in with surface inputs (studs into inlet etc) to be grounded?
My baguetteometer is going off the charts |
|
|
| Report Abuse |
|
|
badfitz67
|
  |
| Joined: 03 Jun 2010 |
| Total Posts: 13165 |
|
|
| 14 Jul 2016 04:21 PM |
@Lord
printed car:IsGrounded() in a renderstepped function and it printed false.
My baguetteometer is going off the charts |
|
|
| Report Abuse |
|
|
darthpyro
|
  |
| Joined: 18 Aug 2009 |
| Total Posts: 3569 |
|
|
| 14 Jul 2016 04:21 PM |
| You can raycast straight down from the object. |
|
|
| Report Abuse |
|
|
badfitz67
|
  |
| Joined: 03 Jun 2010 |
| Total Posts: 13165 |
|
|
| 14 Jul 2016 04:22 PM |
@darth
isn't that just checking the distance, which I said I can't do as the ground is uneven.
My baguetteometer is going off the charts |
|
|
| Report Abuse |
|
|
darthpyro
|
  |
| Joined: 18 Aug 2009 |
| Total Posts: 3569 |
|
|
| 14 Jul 2016 04:23 PM |
| Raycast down from each wheel then. |
|
|
| Report Abuse |
|
|
|
| 14 Jul 2016 04:23 PM |
"no I can't check distance from ground because the ground is uneven."
Does this mean shooting a ray and comparing the ray end and start? |
|
|
| Report Abuse |
|
|
badfitz67
|
  |
| Joined: 03 Jun 2010 |
| Total Posts: 13165 |
|
|
| 14 Jul 2016 04:23 PM |
"Raycast down from each wheel then."
it's a single mesh.
My baguetteometer is going off the charts |
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 14 Jul 2016 04:24 PM |
@badfitz, uh yeah you can. Raycast to the point below the car and see if the part is the a groundpart
|
|
|
| Report Abuse |
|
|
darthpyro
|
  |
| Joined: 18 Aug 2009 |
| Total Posts: 3569 |
|
|
| 14 Jul 2016 04:24 PM |
| So get the offset from the middle of the origin part for each of the wheels and raycast. Or just accept that you're not going to get 100% accuracy from a mesh on uneven terrain. |
|
|
| Report Abuse |
|
|
|
| 14 Jul 2016 04:25 PM |
try this
for each wheel, use GetTouchingParts
if any of the parts are ground then it's not in the air
Add 13,000 posts |
|
|
| Report Abuse |
|
|
0Dan
|
  |
| Joined: 22 Oct 2009 |
| Total Posts: 2552 |
|
|
| 14 Jul 2016 04:25 PM |
Could make invisible parts where the wheels are and weld it to the single mesh, then ray cast down from that
𝐃𝐚𝐧𝐢𝐞𝐥 |
|
|
| Report Abuse |
|
|
badfitz67
|
  |
| Joined: 03 Jun 2010 |
| Total Posts: 13165 |
|
|
| 14 Jul 2016 04:26 PM |
@lord
http://wiki.roblox.com/index.php?title=API:Class/BasePart/GetTouchingParts
it has to be inside the part for it to be touching.
My baguetteometer is going off the charts |
|
|
| Report Abuse |
|
|
|
| 14 Jul 2016 04:27 PM |
ok try this
rage quit because fdfbdfg
Add 13,000 posts |
|
|
| Report Abuse |
|
|
darthpyro
|
  |
| Joined: 18 Aug 2009 |
| Total Posts: 3569 |
|
|
| 14 Jul 2016 04:28 PM |
| Put a thin, invisible, non-collidable part below the car and use GetTouchingParts. |
|
|
| Report Abuse |
|
|