Cast Actor -> Scenecomponent


This is an actor blueprint. The objective is to get the current actor worldtransform and then spawn a new actor on the same location.
Problem is I cant seem to get it casted correctly. Isn’t it Actor is derived from SceneComponent and I can just use self and then casted it into SceneComponent?
Please advise - this seemingly easy blueprint got me stuck for more than a day…

Couldn’t you just plug ‘self’ into the ‘Get World Transform’ do you need to cast to the scene component?

I can’t see how your blueprint is setup but I usually find scene component is useless to find a world transform as it normally never moves unless you explicitly move it. The mesh component (if you have one) is better to get the world transform from. But this is all theory as I don’t know how your blueprint is setup.

Maybe a broader screenshot of your blueprint would help as its hard to see what you’re doing from that limited screenshot.

Not quite on topic, but:

I found out that sometimes set transform (and spawning transform) does not work correctly. But when you split it all and feed as separate nodes it will work. That however may be caused by me using 4.11.

They are not compatible to each other. It says “Self reference is not compatible with SceneComponent reference”.

Oh btw, I am running 4.7.6. Plan to upgrade to 4.11, but the plan is deferred until I get to certain software development mileage.

The blueprint is quite simple - it is an actor blueprint, which instance is dropped into a level. I try to do all the blueprint for all levels inside the actor blueprint. That way, I don’t need to copy-paste level blueprint to all levels. I can simply drop the actor (I called it level actor) into the level, and voila… all level functions work.

Execution has not reached SpawnActor yet… it returns ‘Cast Failed’ when self is downcasted to SceneComponent.

Thanks for all replies, I get it solved by using Get Actor Transform. It was Get World Transform that causes the problem above. Frankly I have no idea why.