Hi guys,I have a question.I want to make a door that can rotate to open automatically when the player get close to it.I have a vedio tutorial about how to do it in level BP but I want to try it in classic BP for its high efficiency.But error occurs when I try to link the the reference node of the door component to the Target slot of the "Set Actor Rotation"Node.It said “objectStaticMeshComponent is not compatible with object Actor” and refused the linking request.See picture below .So why is it.
Hello,
This thread have all your answers : https://forums.unrealengine.com/showthread.php?30924-What-is-the-best-way-to-create-openable-crates-chest-shells-etc
but as it is visible you try to link an actor to a component which are not the same thing.
The static mesh is not an actor by itself. Your entire blueprint is the actor and the mesh is just a component of the actor. You can drag off a “set world rotation” or “set relative rotation” from the static mesh itself and change it from there.
Thank you for your specific explaination,buddy. I have tried as you taught and a new error appears,this time I canot link the track slot of timeline node to the "New rotation"slot of "Set world Rotation"node.See picture below
Thank you for your specific explaination,buddy. I have tried as you taught and a new error appears,this time I canot link the track slot of timeline node to the "New rotation"slot of "Set world Rotation"node.See picture below
Yeah, you can’t use standard vectors and rotations without changing them even though they’re both just 3 x,y,z values. You’re going to have to break the vector into axes and then make a rotator out of them. You’ll convert them into float values that you can then use in any way or direction you want. A regular door that’s on hinges only rotates on 1 axis though, so unless you’re making a door that rotates in some unusual cool kind of way, you can just feed a float track from the timeline into any of the 3 rotation axes.
HI, the thread you given is very helpful ,thank you!But I still met a problem when I do the linking as the picture showed .I have postede my error shot in the thread , would you mind just checking it and telling me one more time if you are not busy,Cheers!
HI, the thread you given is very helpful ,thank you!But I still met a problem when I do the linking as the picture showed .I have postede my error shot in the thread , would you mind just checking it and telling me one more time if you are not busy,Cheers!
Sorry I still confused a little bit for I amnot a programmer.I guess maybe you mean this(see pic below) but I still canot link it.
Hello, i added a post in other thread with the best solution but the main idea you should remember is that if things have different names this is mainly because they are different and as blueprint is like a “visual code” it needs to fit exactly : actor for actor component for component, vector for vector and float for float. I invite you go check : Specialized Node Groups | Unreal Engine Documentation and all links you’ll can find there to learn more and avoid lots of wondering hours.
You don’t need a Lerp when you’ve got a timeline that updates the value every frame anyway.
You need to change the vector track (3 numbers) inside your timeline into a float track (1 number).
And then add that to the default rotation of the door (the angle at which it is at the start).
And you can just have the timeline update the set rotation.
Here’s a blueprint graph explaining what each bit does.
HI,Your BP example is really helpful but I cannot find these two nodes below.Where did you drag them off from,thx.
Thank you I will read it carefully
You just have to make a new rotation variable for that and you can get both of those by picking set and get when it asks it in the location you dragged them to.