#How do I make a piston go until it reaches a surface
1 messages · Page 1 of 1 (latest)
You could get the position of the piston and add a sphere cast to it. Add an event 30hz and a if so when hit on sphere cast is true it will stop and connect stop to an event sender.
raycast or vector dooooooot
Use a raycast
Get the pistons forward vector and position and wire it into a raycast
The raycast will output the distance from the piston to the object that it hit
Wire that into the distance input on your piston
How do I get those?
there chips search them up and place them
Raycast
Get forward vector
Get position
Look at the pistons circuit board
There’s a yellow output at the very top
wire it to the Get chips
@junior spindle
This isn’t working
Attach a object to the piston and try it
Connect a thingy to the yellow rod on the piston?
Yep with your connect/wiring tool
One Don't hook up the distances and two u want the raycast distance to be smaller so that it's directly infront of the piston and number three u need an if chip that's hooked up to the hit part of raycast then hook the then up to the stop on piston and configure raycast to ignore players 🙂also just curious what's this for?
I don’t mean to be rude
But I have no idea what you’re trying to say here
If I'm wrong it's probably cuz I'm half decent at circuits in my opinion
Not rude
Ehhh
It's instructions
Also it’s for a hook thing that shoots out and grabs players
Oh
I can make u one
Also u wouldn't have to do that
That's just extremely confusing
No, I want to make it myself
I also want a model to go with it
Mk
My plan is to attach a trigger volume and a seat to a piston that just goes until it hits something or until about 5 seconds is up
Hol about u do both
Huh
Dw about it
I’ll mess with this ray cast thing until it works
So after the trigger hits something or both after a delay of five seconds piston comes
Baco
Ohhh
That’s what I meant
Yuh
Hmmm
U could get a trigger handle and when trigger handle primary action pressed piston fires forward and it has a trigger volume with seat in front hooked to gold bit and when the trigger volume touches a player it's seats that player and when it touches a object it stops and after a delay of 5 seconds after delay brings piston back
And wire piston to gold bit on a clamp and the trigger to black part
Then it should work ish
🙂
Omg I’m so stupid
Idk why I didn’t think of that
I didn’t think to use the trigger volume to stop the piston
Cuz u smarter n there's probably a better way
You found the better way
Tysm
Collision detection volume on Object hit stop piston🤷♂️
Mhm
But the collision volume does the same as trigger in this case
collision detection Volume is more accurate in moving targets tho
U have a point
They could just switch them out still same instructions
I don’t mean to butt in but the collision detection volume would probably go off more than once due to there being multiple collisions on it that detect it being hit
Ehhhhh
From my use of the collision detection volume it’s more janky than a trigger volume
If they have a specific target to hit they could just add a tag and make it only fire the excec if the hit target has the tag🤷♂️
Yeah I get that but since collision detection volumes use multiple collisions inside of it, it’ll go off more than once
Ahhh. Then filter it with an int variable that adds with each hit. If less or equal to 1 execute, Else do nothing
Then when the trigger handle is pressed again reset the variable and push piston
Yup
That would definitely work, I just had to butt in because of how they act when hitting a player, it executes every single time the player hits a collision causing the impulse on said player to like die😭
We should definitely be able to edit how much collisions are in it
I agree and be able to set how long the collisions are so we can use a single collision and make it long enough to match the blade of a sword if needed
munki
looking for a thing
Monk
Magic
b-brick san?!
No way
yooo is magic a reference to how hazmat bucket disappeared from the server?
Is this already answered
I mean I would have just got a trigger volume on the piston and attached it to the piston and when the object entered I would stop the piston
i think bvrr has a video sorta explaining this