#How would I go about this?

1 messages · Page 1 of 1 (latest)

magic quartz
#

This (one part of my punch script) currently fliings the player in the direction parellel to where they touched the hitbox. How would I make it fling them in a set direction?

jade delta
#

by passing in the set direction you wanted Thumbs

magic quartz
jade delta
#

you said you have a set direction? just pass that in instead of using (hrp-hitbox).unit

magic quartz
#

or do i have to use a variable for it?

jade delta
#

cframe.lookvector is also a direction

#

and so is vector.yaxis

#

i'm not going to give you specific solutions, not here to write it for you. i'm just telling you how you'd go about it.

magic quartz
#

oh wait i think i got it

#

ty

#

it should work now

jade delta
#

pass in whatever direction you want like its a function parameter like function hitbox(direction,etc...)

magic quartz
#

im kinda dumb with directions, math, etc

jade delta
#

a position is technically also a direction with magnitude in it, it's the direction from 0,0,0 and how far it is

magic quartz
#

wait it is?

jade delta
#

yes

magic quartz
#

does it literally just have no velocity and is just a direction?

jade delta
#

(hrp-hitbox) is also a direction with a magnitude in it, that's why you use .unit to make it a pure direction vector

jade delta
magic quartz
#

im gonna be honest i had the flu in my physics unit

jade delta
#

this isnt physics

#

this is geometry

magic quartz
#

well it techincally is physics since it's done inside a physics engine it's just different from actual physics

#

and besides i was being sarcastic

#

but thx for the info

#

i honestly didn't know a positions had a magnitude/velocity

jade delta
#

well of course it is

#

if you do position.unit, it is the direction from 0,0,0

magic quartz
#

well yeah

#

ofc it is

#

wait yeah now that i say it outloud i do seem very stupid huh