badfitz67
|
  |
| Joined: 03 Jun 2010 |
| Total Posts: 13165 |
|
|
| 19 Apr 2016 04:21 PM |
local mag = (v.Position - workspace[game.Players.LocalPlayer.Name]:FindFirstChild("Torso").Position).magnitude sizeFactor = math.floor(mag) v.CFrame = CFrame.new(walls[v][1].X,0,walls[v][1].z)
how can I make v go higher when closer, smaller when further away?
putting sizefactor in the y value works, but the parts are shaky
"Well someone has to stay to the end, sir" |
|
|
| Report Abuse |
|
|
|
| 19 Apr 2016 06:13 PM |
Oi, lol been a while since verlet.
You should save the old position of the wall before you apply the size and then position it back to the old position with cframe
|
|
|
| Report Abuse |
|
|
|
| 19 Apr 2016 06:16 PM |
Oops, the shaky might be from your character's torso breathing animation. You should use the HumanoidRootPart for the magnitude check then.
|
|
|
| Report Abuse |
|
|
badfitz67
|
  |
| Joined: 03 Jun 2010 |
| Total Posts: 13165 |
|
|
| 20 Apr 2016 01:43 AM |
this isn't verlet btw
"Well someone has to stay to the end, sir" |
|
|
| Report Abuse |
|
|
|
| 20 Apr 2016 01:45 AM |
I don't see how that's verlet at all...
"how can I make v go higher when closer, smaller when further away?" Well assuming you want it linear, you could do something like:
v = math.max(0, maxV - mag) or something |
|
|
| Report Abuse |
|
|
badfitz67
|
  |
| Joined: 03 Jun 2010 |
| Total Posts: 13165 |
|
|
| 20 Apr 2016 01:54 AM |
play trioxides walls of granite https://www.roblox.com/games/248831969/Walls-of-Granite
that's what I'm trying to create. I've changed my script to this, currently:
local mag = (v.Position - workspace[game.Players.LocalPlayer.Name]:FindFirstChild("HumanoidRootPart").Position).magnitude sizeFactor = math.floor(mag) v.CFrame = walls[v][1]*CFrame.new(0,-sizeFactor+(walls[v][1].Y+v.Size.Y/10),0)
this works fine but there's a problem: jumping makes them go down
"Well someone has to stay to the end, sir" |
|
|
| Report Abuse |
|
|
badfitz67
|
  |
| Joined: 03 Jun 2010 |
| Total Posts: 13165 |
|
| |
|
badfitz67
|
  |
| Joined: 03 Jun 2010 |
| Total Posts: 13165 |
|
|
| 20 Apr 2016 10:48 AM |
b
"Well someone has to stay to the end, sir" |
|
|
| Report Abuse |
|
|
|
| 20 Apr 2016 11:18 AM |
| To start, clean up your code. |
|
|
| Report Abuse |
|
|
badfitz67
|
  |
| Joined: 03 Jun 2010 |
| Total Posts: 13165 |
|
|
| 20 Apr 2016 11:28 AM |
why are the pseudo trolls back
"Well someone has to stay to the end, sir" |
|
|
| Report Abuse |
|
|
|
| 20 Apr 2016 11:43 AM |
maybe if they jump you do the opposite in the code so it goes up instead of down
idk man
#Code print("Narwhals are our future") |
|
|
| Report Abuse |
|
|
badfitz67
|
  |
| Joined: 03 Jun 2010 |
| Total Posts: 13165 |
|
|
| 20 Apr 2016 12:10 PM |
n
"Well someone has to stay to the end, sir" |
|
|
| Report Abuse |
|
|
|
| 20 Apr 2016 09:06 PM |
I'm just saying it's been a while since i've spoken to you on the verlet post
|
|
|
| Report Abuse |
|
|
|
| 20 Apr 2016 09:08 PM |
Don't take the y value of the humanoid root part's position...
do local HRP = Character.HumanoidRootPart local OffsetFromTheFloor = 3 -- Distance from feet to center of the rootpart/torso local NewPos = CFrame(HumanoidRootPart.x,OffsetFromTheFloor,HumanoidRootPart.z)
|
|
|
| Report Abuse |
|
|