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: Best way for verlet collision?

Previous Thread :: Next Thread 
Badfitz100 is not online. Badfitz100
Joined: 03 Nov 2010
Total Posts: 12591
04 Mar 2015 12:47 PM
I'm using this:

http://www.roblox.com/Rope-Example-item?id=222174211

if you could tell me the best method, and what function I would put it in would be great

Get in the back, bend over AND TAKE YOUR GOD DAMN SOCKS OFF
Report Abuse
Badfitz100 is not online. Badfitz100
Joined: 03 Nov 2010
Total Posts: 12591
04 Mar 2015 01:10 PM
b1
Report Abuse
AbstractMadness is not online. AbstractMadness
Joined: 22 Dec 2014
Total Posts: 20425
04 Mar 2015 01:11 PM
"Get in the back, bend over AND TAKE YOUR GOD DAMN SOCKS OFF"

im leaving
Report Abuse
Badfitz100 is not online. Badfitz100
Joined: 03 Nov 2010
Total Posts: 12591
04 Mar 2015 01:12 PM
it was my siggy pls!!

I keep thinking, how can my feet smell if they don't have a nose?
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
04 Mar 2015 01:14 PM
I used FindPartsInRegion3, but that is probably a stupid way of doing it.
Report Abuse
Badfitz100 is not online. Badfitz100
Joined: 03 Nov 2010
Total Posts: 12591
04 Mar 2015 01:15 PM
I heard raycasting is a good way but I don't know what function to put it in and what point to change

I keep thinking, how can my feet smell if they don't have a nose?
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
04 Mar 2015 01:17 PM
Oh yeah! I used raycasting! That is pretty cool. Just raycast along the velocity it is taking, and see if it will collide. If it does, move it to the collision point and stop its velocity.
Report Abuse
Alyte is not online. Alyte
Joined: 24 Oct 2011
Total Posts: 10090
04 Mar 2015 01:18 PM
badfitz whats ur obsession with feet oh wait nvm i know its too innapropriate for these forums tho
Report Abuse
Badfitz100 is not online. Badfitz100
Joined: 03 Nov 2010
Total Posts: 12591
04 Mar 2015 01:20 PM
'Oh yeah! I used raycasting! That is pretty cool. Just raycast along the velocity it is taking, and see if it will collide. If it does, move it to the collision point and stop its velocity.'

yeah I know that, but I honestly don't know how to set it and what function (calculate? constrain? update?)

I keep thinking, how can my feet smell if they don't have a nose?
Report Abuse
Badfitz100 is not online. Badfitz100
Joined: 03 Nov 2010
Total Posts: 12591
04 Mar 2015 01:28 PM
so I currently have something like this

function Calculate(Point,DeltaTime,Prev_Delta)
if not Point.Pinned then
local ray = Ray.new(Point.Position, workspace.BasePlate.Position)
local part, endPoint = workspace:FindPartOnRay(ray)
Point.Acc_X = 0
Point.Acc_Y = Gravity
Point.Acc_Z = 0

Point.Vel_X = Point.Position.X - Point.Prev_X
Point.Vel_Y = Point.Position.Y - Point.Prev_Y
Point.Vel_Z = Point.Position.Z - Point.Prev_Z

Point.Next_X = Point.Position.X + Point.Vel_X * (DeltaTime/Prev_Delta) *0.85 + Point.Acc_X * DeltaTime^2
Point.Next_Y = Point.Position.Y + Point.Vel_Y * (DeltaTime/Prev_Delta) *0.85 + Point.Acc_Y * DeltaTime^2
Point.Next_Z = Point.Position.Z + Point.Vel_Z * (DeltaTime/Prev_Delta) *0.85 + Point.Acc_Z * DeltaTime^2

Point.Prev_X = Point.Position.X
Point.Prev_Y = Point.Position.Y
Point.Prev_Z = Point.Position.Z
if part and not Point.Pinned then
print((Point.Position - part.Position).magnitude)
Point.Vel_Y = Point.Position.Y - Point.Prev_Y + (Point.Position - part.Position).magnitude
end
Point.Position = Vector3.new(Point.Next_X , Point.Next_Y - Point.Vel_Y , Point.Next_Z)
else
Point.Acc_X = 0
Point.Acc_Y = 0
Point.Acc_Z = 0

Point.Vel_X = 0
Point.Vel_Y = 0
Point.Vel_Z = 0

Point.Prev_X = Point.Position.X
Point.Prev_Y = Point.Position.Y
Point.Prev_Z = Point.Position.Z
Point.Position = script.Parent.StartingPoint.Position --Attaches to a brick :D
end
--print(Point.Position)
end

only thing I made here is the raycasting stuff.

any people care to help?

I keep thinking, how can my feet smell if they don't have a nose?
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