Just want some help with a simple jump to a cube and hang from it but also can jump down.
Using third person to demonstrate it better.
- added a sphere collision to the char:
- created a hook with a tag:
- and the script in the character blueprint:
It’s pretty basic but seems to work OK for what it is.
You can use isGrabbing to block movement input so you can’t move while riding.
isGrabbing is a boolean variable (true / false) that we switch to True once the Grabber found something to grab onto.
The Hook cube:
- create a new actor in the content browser
- add a static mesh component and set its mesh (or simply add a cube)
- select that mesh and search for tag in the details panels, you can now add a tag
- and you can drag those actors into the scene from the content browser and position them
The InterpToMovement component is optional, I use it here to make the hooks move, you may have a different method for this. Since it’s supposed to work like the Bioshock’s one, I’d assume it will be a spline based movement.
But get it to work on a non-moving actor first, you can worry about movement later on.
If you wish, I can zip the project and drop it on Google Drive if it makes it easier to study / reverse engineer it.
Yes thank you.
Thanks alot, but i dont really know what you mean about a “hook with a tag” is is a scene component?
And is there a way to pull the player towards the hook from a certain distance.
Hook with a tag - it’s an actor that has a Static Mesh Component called Hook, the component was given a tag that makes it easy to identify it in the world later on. You see them floating about in the animation.
And is there a way to pull the player
towards the hook from a certain
distance.
Yes, one way would be to make the Grabber’s radius larger. The Tick functionality at the bottom of the graph does the pulling - it interpolates between wherever the player currently is and the desired position - 150uus under the hook’s static mesh.
There are many approaches to this functionality. Choosing one would depend on the details. The above is based on:
a simple jump to a cube and hang from
it but also can jump down
I did not comment the script, lazily hoping it would be self-explanatory. Do tell if it’s not.
Please forgive me im extremly new to unreal, how do i make “is grabbing” cube?
And ill try to figure the pull one with your advice
Here it is.
Good luck!