#Bouncing from walls

1 messages · Page 1 of 1 (latest)

dusk hazel
#

Hi, in my game, Im making that you can fling yourself AND i want you to be able to bounce from walls, and the direction of the camera affects on the bounce so you can control it, but i dont know trigonometry yet, can anyone help me with this pls?

#

Any ideas help!

winter hornet
#

ts some DEEP math ngl

#

i got no clue

latent pier
polar blade
#

what is this, 1826 and we're still lighting our houses with candles and churning butter by hand? tf 😂

#

you don't even need to go to a library anymore, the library containing everything humanity knows is in your actual pocket

#

AND YOU DON'T KNOW TRIG?

#

wtf

#

how?

#

how is this possible?

#

imagine asking how to learn in the big 2026 when everything humanity knows is at your literal fingertips

trim spear
#

so u can get the backwards direction

#

then u just multiply it with speed and apply that to a velocity instance

old torrent
#

Store the assembly linear velocity you're moving with before landing and once you land send the player with the same velocity but backwards

#

Or just

#

local v = Vector3.new(10,-10,10)

#

And

#

VelocityToFlingBack = -v

#

And apply it

#

And times it by the unit product between the camera and the velocity backwards

shell epoch
#

You can just use Raycasting to get the wall Normal and reflect the velocity off it.

#

Put this script in StarterCharacterScripts as a local script.

dusk hazel
#

MMy school is so bad that we still didnt learn abt PI

#

on 2nd grade

#

and

#

wwe learning the basics of fractions

#

or 2nd year idk

dusk hazel
#

Update : I did it

#

what happens if i say "@ here"?

winter hornet
#

@here

whole lion
#

it's actually really easy

shell epoch
#

u used math? or other ways?

#

there are other ways that avoids math

whole lion
shell epoch
#

more likely u would have done it in less than 5 min

#

or sometimes math is needed so were both correct

winter hornet
#

it sounds crazy but chatgpt does a good job at math

shell epoch
#

Use gemini instead if u want 100% no mistakes

whole lion
#

nah the big gpt better at everything than gemini

#

ig gemini is faster but makes way more mistakes

#

just outright tells you wrong things

shell epoch
#

and he faild me

#

he cant make any kind of script right

#

with math or without

#

gemini lowkey understand better and then u use deep think he will make the best results

#

he gets the idea better tho

dusk hazel
#

should I close this post?