Devlog 1: The Rotation Sensation
Hello!
One of the core mechanics in Lockdown, is the ability to pick up, move, and inspect objects in order to solve problems.
I'm going to show you what I did in UE5.1 for this mechanic.
When the player presses left click, a line trace is shot out(a line trace is basically a raycast in unity).
If the Line hits a physics object, a physics handler is used to allow the player to pick up and move with objects freely until the left mouse button is released
I use an event tick to check if the object is being held, and updating it to follow the players position
Isn't that neat!
In order to rotate and zoom in objects, I first needed a separate blueprint so it can be easier for future me to add properties to objects. I made the blueprint have an empty static mesh with a sphere collision around it. The mesh is empty so you can easily replace what model you want to use in game.
I go back into the player blueprint and create another invisible static mesh component. I then have an event if the player presses Q while already picking up an object, the object will appear closer to the screen, changing the second static mesh to the item that is being held, and disabling movement.
I have the mouse x and Y axis affect the rotation while in this stage using a rotator, affecting the roll and pitch.
Zooming in and out uses the scroll wheel, and, with a branch(if statement) to see if the item is already zoomed out, if it is, you can zoom in! I have this in so you don't get motion sickness since the animation repeats violently. I use a timeline so the zoom doesn't teleport the object to your face, instead actually giving it a zoom effect.
Isn't that neat?
(sorry itch.io only lets me upload 3mb files or lower)
Well the first mechanic is done, I cant wait to show you the others we have in store for you!
Until next time!
~Steven
Get Lockdown
Lockdown
You are alone. You are being watched. Nothing is as it seems. Will you break out, or break down?
Status | Prototype |
Author | Dreamweaver Design |
More posts
- wrap upJul 24, 2023
- Strong UI and why 2D elements are just as important.Jul 17, 2023
- Decals - The Stickers of Video Games (UE5)Jul 16, 2023
- Voiceover, and the Audacity of It AllJul 11, 2023
- Working in Unreal: Making sure your project doesn't run at 2 FPSJul 04, 2023
- Franklin Clodfelter final prep on assetsJun 30, 2023
- My Retro Futuristic Kitchen Assets - MindsetJun 26, 2023
- WhiteboxingJun 21, 2023
- Keeping to the Theme: ModelingJun 18, 2023
- Object Use - Key Question and FormJun 13, 2023
Leave a comment
Log in with itch.io to leave a comment.