Ground alignment script, summon on a choosen position with mouse.

Hey!

I want to summon something on the ground from a chosen position. Like rain of fire in World of Warcraft:

srsly, that video… awful. 50% of it was intro text for the guy’s channel (ugh, hate that shit). And the audio… oh dear god… cause that was important for said video… ugh.

Anyways, onto your question.

Well, first thing is finding the point on the ground where the mouse is. Calculate a ray from the camera and cast that into the world to find the location to hit:

now you have a point on screen where the thing should be spawned.

As for what to spawn… well… that’s up to you. Particle effects, models, what not… just spawn what you want at that point.

Yeah sorry for the video, just searched fast and pasted :stuck_out_tongue:
Yeah, tought of raycasthit but its kind of buggy sometimes?

It’s a raycast… raycasting is one of the most integral part of working in a 3d game engine. It’s hardly what I’d call buggy.

Ofc i know that.
Would just like to have a script that gives me the heightvalue of the ground.+

Anyway, i did the scritp now. Lol