Jump to content

  • Log In with Google      Sign In   
  • Create Account

Sleicreider

Member Since 08 Oct 2012
Offline Last Active May 09 2016 03:01 AM

#5242908 Build 3D objects in-game?

Posted by Sleicreider on 27 July 2015 - 01:20 AM

 


Can you perform the first thing shown in that video, looking at a spot and dynamically spawning some object where you're looking with a keypress? If not, consider focusing only on that problem first.

 

 

 


yup i know how to do that

 

so you take the x,z position you'd place the object at, integer divide x and z by 10, then multiply x and z by 10, and just like that you're snapping to 10x10 grids.

 

IE: raypick returns coordinates 127,38.  integer divide by 10 yields 12,3. multiply by 10 yields 120,30. so you picked 127,38, but snap to 120,30.  

 

then its just setting the orientation (y rotation). axis aligning everything is one easy way to handle this.   IE y rotation = 0, and make sure your models face the correct direction in your modeling software before export.

 

that's the general approach that first comes to mind.

 

 

this seems to be a good solution :)  i'll try it as fast as possible 




#5242283 Build 3D objects in-game?

Posted by Sleicreider on 23 July 2015 - 05:17 PM

yup i know how to do that :P




#5242273 Build 3D objects in-game?

Posted by Sleicreider on 23 July 2015 - 04:17 PM

well i'm working with ue4, but don't really know where to start.

also searched about alignment and snapping, but haven't found much 




#5242244 Build 3D objects in-game?

Posted by Sleicreider on 23 July 2015 - 02:05 PM

I would like to know if this techique has a name and how it works:
 
 
I saw it in several games, where object are automatically aligned near other objects to build a house or whatever.
 
 
 
can anynone help me?



PARTNERS