Hi,
I'm new to Irrlicht Engine and I have intended to use it to write a 2D space game.
I would like to know if it is somehow possible to draw a rotated and scaled texture using Draw2DImage method?
Or is there some simple 3D technique which I could use to create 2D graphics?
Rotating a sprite
-
rogerborg
- Admin
- Posts: 3590
- Joined: Mon Oct 09, 2006 9:36 am
- Location: Scotland - gonnae no slag aff mah Engleesh
- Contact:
Re: Rotating a sprite
Not using that method, no.jjokiranta wrote:I would like to know if it is somehow possible to draw a rotated and scaled texture using Draw2DImage method?
It's relatively simple to do, but there's no direct built in support or SDK examples for it.Or is there some simple 3D technique which I could use to create 2D graphics?
First, you'll want to use an orthogonal camera. ICameraSceneNode::setIsOrthogonal(true);
What you'll need to do is to create scene nodes with a simple quad mesh (see source\Irrlicht\CBillboardSceneNode.cpp) and apply a texture to it. Then you can rotate and scale it using setScale() / setRotation() as normal.
If you hop on #IRC, I'm sure there'll be someone there who's done 2D with Irrlicht who'll be able to give detailed assistance.
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
-
jjokiranta
- Posts: 2
- Joined: Wed Oct 10, 2007 7:20 pm
oh
I tried to do pseudo 2d with irrlicht and it was a PAIN in the A. If the game is truely 2d, check out HGE engine. Its very worked through and covers everything you need in a 2d game, trying to do it in irrlicht instead will be veery timeconsuming.
Also i dosnt seem that irrlicht support easy and fast rescaling and rotation of 2d sprites. Check out the 1000 hares example in HGE. Its pretty impressive.
E
I tried to do pseudo 2d with irrlicht and it was a PAIN in the A. If the game is truely 2d, check out HGE engine. Its very worked through and covers everything you need in a 2d game, trying to do it in irrlicht instead will be veery timeconsuming.
Also i dosnt seem that irrlicht support easy and fast rescaling and rotation of 2d sprites. Check out the 1000 hares example in HGE. Its pretty impressive.
E
hge looks nice.. may run on older PCs. Alot of us want to do a game, but are not able to do 3d modeling, we struggle enough with 2D. I may go to that engine. Unless I can figure out how to do a 3rd person game better using 3d stuff. I know there is the 3rd person camera, but can I do a 2d tiled map with it? and what would be the best way. I could probably get a model for my character.. but like I said many of us don't know 3d modeling.
thank you,
jrm
thank you,
jrm