About Store Forum Documentation Contact
Donations:
309$/mo



Post Reply 
Textures
Author Message
DreamsInHD Offline
Member

Post: #1
Textures
Hey,

How do i put an image on an actor, a box for example?
If a draw an image on the position of the box, the image just sticks to my screen
but not to the box.
11-08-2015 12:04 PM
Find all posts by this user Quote this message in a reply
yvanvds Offline
Silver Supporter

Post: #2
RE: Textures
Actors are not really meant for drawing. You can draw the outline, but that is mainly to verify the actor is behaving correctly. I'm guessing you either want to make a 3D app, or want to use physics for a 2D app. (Because you talk about drawing images, not meshes.)

The 3D method

To draw in 3D, you need a mesh. Perhaps the simplest example is in tutorials 13 - Mesh. The armor rendering app shows how to draw a mesh, but might be a bit complicated to study because of all the other stuff in there.

Anyway, you use an actor in combination with a mesh to draw in 3D. The actor is the controller, the mesh is drawn at the position of the actor.

To create a new mesh, you can use the editor. I'm sure there are video tutorials for that. (It is also possible to import meshes created in other software.)

The 2D method

Math\Camera contains functions like PosToScreen and ToScreenRect. They can be used to get the screen position for an actor in the 3D viewport.
11-08-2015 02:19 PM
Find all posts by this user Quote this message in a reply
DreamsInHD Offline
Member

Post: #3
RE: Textures
Thanks a lot, Jonas (SMA) smile.
11-08-2015 03:31 PM
Find all posts by this user Quote this message in a reply
Post Reply