Crystal Space
Welcome, Guest. Please login or register.
November 23, 2014, 04:50:25 am

Login with username, password and session length
Search:     Advanced search
9018 Posts in 2046 Topics by 9094 Members
Latest Member: Olafzjez
* Home Help Search Login Register
+  Crystal Space
|-+  Associate Projects
| |-+  CEL Discussion
| | |-+  How to draw/show an Entity?
« previous next »
Pages: [1] Print
Author Topic: How to draw/show an Entity?  (Read 2927 times)
mark
Full Member
***
Posts: 101


View Profile
« on: October 12, 2005, 04:15:54 pm »

I have a mapfile loaded as an entity and will create a player later. How can I show/draw these entities then?
Do I only need to attach a camera pc to the player and that does all that stuff automatically and I don't have to write code if something like the point of view changes?
I looked into the celtutorial p5, MainApp::CreatePlayer() and hopefully understood that right *g*
Logged

Gentoo Linux ~x86, kernel 2.6.11-cko9 smp, gcc 3.4.4-r1, binutils 2.16.1, glibc 2.3.5 NPTL
CS+CEL Pseudo Stable 2005.09.03
muffinpeddler
Full Member
***
Posts: 122


View Profile Email
« Reply #1 on: October 13, 2005, 01:04:26 am »

Well, if you create the entity like this (Look into the CreateEntity function in iCelPlLayer):

Code:
        playerEntity = pl->CreateEntity("player", bl,
                                        "player_behave",
                                        "pcdefaultcamera",
                                        "pcmesh",
                                        "pclinearmovement",
                                        "pcactormove",
                                        "pccommandinput",
                                        0);

And the entity has the pcmesh property class, it can be displayed, and will be by default I believe.  There are methods to hide and show a mesh, so you should look into that if you wish.  Really, getting an object to be displayed is trivial.
Logged
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 5.58 seconds with 17 queries.