The scene IS that pointer
You have to put the scene where you want the character to stand and face.
The code we have includes the camera.
We can fix the centering later.
The scene IS that pointer
You have to put the scene where you want the character to stand and face.
The code we have includes the camera.
We can fix the centering later.
Yes, of course, when you have some free time.
Thank you for your help! I am very grateful to you!
If you have time, I really waiting to your help
It will be later
Rather than casting, you need to make an interface call. Something like ‘interact prep’, that returns the location and rotation of the scene component.
You can call this on the actor when you want to interact, it will give you the info, and the player can reposition. No casting.
So it’s the same as we’re doing now, except with an interface call.
Two more steps after that
Get the camera level. I think that’s just a case of taking the Y ( or possibly X ) from the scene component also. ( We’re already taking the Z ).
Doing it smoothly.
Maybe you can make some progress on this before I come back to you. It probably won’t be for another 6 hrs or so
) Ok, thank you!
So I made an interface like this
added it to my interactable door, like this
and the player code now reads
It works, result is the same, but now we’re not casting, and we can call it on any actor.
To get the camera to say level, it’s just one change
The Y from the rotation of the scene is fed into the control rotation
Finally, to smooth it out. The new code goes like this
and that new custom event is
If you don’t want the player to have any control while it’s going on ( they have very little anyway ), you can always
Thank you so much for your help! I learned a lot. The only thing I haven’t been able to do is to rotate the camera to the center of the object, the character still looks at the center of the screen, but not at the center of the object.
I still can’t figure out why? Maybe there are some camera settings?
I’m really ashamed to take up more of your time, you’ve taken so much time to teach me so many things.
I already have a suspicion that the problem is with the character.
And this is the object itself. Maybe I set something wrong here?
I even created another object, but it too Character looks only at the center of the screen, not at the center of the object
I wrote the code exactly as you did, but something prevents my character from always looking in the same place.
Thank you for your help!
Did you connect the Y from scene to the control rotation?
Ah, wait a minute, you’ve got a spring arm in a first person?
It might be that you need to twiddle with one of the options there, not sure which one. You got a lot of options connecting character rotation / camera rotation / spring arm blah blah…
That bit’s up to you I’m afraid…
Thank you so much, we did a great job with you. I tried all night tonight to figure out how to rotate the camera, I assigned initial variables to the character’s camera position, then made a variable that records the camera position at the moment, subtracted the difference between the position at the moment and the correct camera position in relation to the object, but all in vain.
There’s no way I can make the camera always look at the spot on the object that I want it to.
Like I say, what I gave you should be enough. It is for the standard FP, which has no swing arm.
There are various tickboxes I would try
Character
Camera
Boom
Thank you so much!
I was finally able to get what I wanted!
Like you said, I should have checked in the camera settings
use pawn control rotation. But it was breaking the automatic up or down for some reason. I tried different settings for a long time, but nothing worked. And then I got the idea to only disable this setting when there is interaction and it worked!
I am eternally grateful to you for teaching me all this.
Thank you so much! Thank you! Thank you! Thank you!
Great! ( good idea )