Crystal Space
Welcome,
Guest
. Please
login
or
register
.
May 24, 2013, 11:21:15 am
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Search:
Advanced search
9224
Posts in
2230
Topics by
5388
Members
Latest Member:
ryankbyers
Crystal Space
Associate Projects
CEL Discussion
Dose every entity has a camera?
« previous
next »
Pages:
[
1
]
Author
Topic: Dose every entity has a camera? (Read 5164 times)
Hilake
Newbie
Posts: 27
Dose every entity has a camera?
«
on:
August 11, 2005, 09:51:38 am »
hi!
I use cel for my programe! For example about celtest. I want to add an actor in the world, so I use the function CreatActor(). But when I show it, it changes the first actor's camera to the one which I add. But I didn't want to that happened. I just want to add an actor and not change the camera. How can I do? How can I show the second actor in my game?
Give me some code for your answer!
Thanks,
Logged
jorrit
Administrator
Hero Member
Posts: 1703
Re: Dose every entity has a camera?
«
Reply #1 on:
August 11, 2005, 11:06:12 am »
Quote from: Hilake on August 11, 2005, 09:51:38 am
hi!
I use cel for my programe! For example about celtest. I want to add an actor in the world, so I use the function CreatActor(). But when I show it, it changes the first actor's camera to the one which I add. But I didn't want to that happened. I just want to add an actor and not change the camera. How can I do? How can I show the second actor in my game?
Give me some code for your answer!
Thanks,
Just make a new version of CreateActor() that doesn't add the camera.
Greetings,
Logged
Hilake
Newbie
Posts: 27
Re: Dose every entity has a camera?
«
Reply #2 on:
August 12, 2005, 02:20:53 am »
Quote from: jorrit on August 11, 2005, 11:06:12 am
Just make a new version of CreateActor() that doesn't add the camera.
Thanks very much! I had tried it. It's successful.
But there have another problem for me. The problem will display a error like 'Can't find entity 'camera' for action SetCamera!', when I change the entiy's name. In celtest the entity's name is 'camera', so If the entity's name must be 'camera'? This way, how can I change the entity's name and not get the error?
Another questions:
If the entity have no camera. Then how to set the entity's position and render it in the game world?
«
Last Edit: August 12, 2005, 06:17:31 am by Hilake
»
Logged
jorrit
Administrator
Hero Member
Posts: 1703
Re: Dose every entity has a camera?
«
Reply #3 on:
August 12, 2005, 07:20:22 am »
Quote from: Hilake on August 12, 2005, 02:20:53 am
But there have another problem for me. The problem will display a error like 'Can't find entity 'camera' for action SetCamera!', when I change the entiy's name. In celtest the entity's name is 'camera', so If the entity's name must be 'camera'? This way, how can I change the entity's name and not get the error?
You have to change the call to SetCamera() too then. i.e. change the name.
Quote
Another questions:
If the entity have no camera. Then how to set the entity's position and render it in the game world?
Use the pcmesh property class for that. Check out the iPcMesh api.
Greetings,
Logged
Hilake
Newbie
Posts: 27
Re: Dose every entity has a camera?
«
Reply #4 on:
August 12, 2005, 09:51:13 am »
Quote from: jorrit on August 12, 2005, 07:20:22 am
You have to change the call to SetCamera() too then. i.e. change the name.
Quote
Thanks!
Do you mean that I must difine the entity's name to "camera"? But I want change the name, there still the error. How can I do?
Logged
jorrit
Administrator
Hero Member
Posts: 1703
Re: Dose every entity has a camera?
«
Reply #5 on:
August 12, 2005, 09:54:57 am »
Quote from: Hilake on August 12, 2005, 09:51:13 am
Quote from: jorrit on August 12, 2005, 07:20:22 am
You have to change the call to SetCamera() too then. i.e. change the name.
Quote
Thanks!
Do you mean that I must difine the entity's name to "camera"? But I want change the name, there still the error. How can I do?
I don't understand the problem. You can safely change the name of the entity. But you must then change it everywhere that that name is referenced. It is as easy as that. So everywhere there is the name "camera" you must change that to the new name.
Greetings,
Logged
Hilake
Newbie
Posts: 27
Re: Dose every entity has a camera?
«
Reply #6 on:
August 12, 2005, 11:26:09 am »
Thanks a lot!
But I miss another problem. For example, I create a actor without camera. But I want to show it, so I do it in this way:
Code:
csRef<iPcMesh> pm = CEL_QUERY_PROPCLASS_ENT (entity, iPcMesh);
pm->MoveMesh (sector, csVector3(3,0,0));
pm->Show();
Is there another way to show it? For it so difficulte to get the sector. Or is there anyway to get the sector?
Thanks for your help!
Quote from: jorrit on August 12, 2005, 09:54:57 am
I don't understand the problem. You can safely change the name of the entity. But you must then change it everywhere that that name is referenced. It is as easy as that. So everywhere there is the name "camera" you must change that to the new name.
Logged
jorrit
Administrator
Hero Member
Posts: 1703
Re: Dose every entity has a camera?
«
Reply #7 on:
August 12, 2005, 11:41:43 am »
Quote from: Hilake on August 12, 2005, 11:26:09 am
Thanks a lot!
But I miss another problem. For example, I create a actor without camera. But I want to show it, so I do it in this way:
Code:
csRef<iPcMesh> pm = CEL_QUERY_PROPCLASS_ENT (entity, iPcMesh);
pm->MoveMesh (sector, csVector3(3,0,0));
pm->Show();
Is there another way to show it? For it so difficulte to get the sector. Or is there anyway to get the sector?
I don't understand the problem. What's difficult about getting the sector?
Greetings,
Logged
Hilake
Newbie
Posts: 27
Re: Dose every entity has a camera?
«
Reply #8 on:
August 14, 2005, 03:23:11 am »
Quote from: jorrit on August 12, 2005, 11:41:43 am
Quote from: Hilake on August 12, 2005, 11:26:09 am
Thanks a lot!
But I miss another problem. For example, I create a actor without camera. But I want to show it, so I do it in this way:
Code:
csRef<iPcMesh> pm = CEL_QUERY_PROPCLASS_ENT (entity, iPcMesh);
pm->MoveMesh (sector, csVector3(3,0,0));
pm->Show();
Is there another way to show it? For it so difficulte to get the sector. Or is there anyway to get the sector?
I don't understand the problem. What's difficult about getting the sector?
Greetings,
I must get the 'sector' when I show the entity which has no 'camera'. But I don't know how to get the sector before I show the entity.
Is there antway to show the entity that has no 'camera'?
Logged
jorrit
Administrator
Hero Member
Posts: 1703
Re: Dose every entity has a camera?
«
Reply #9 on:
August 14, 2005, 05:55:30 am »
Quote from: Hilake on August 14, 2005, 03:23:11 am
I must get the 'sector' when I show the entity which has no 'camera'. But I don't know how to get the sector before I show the entity.
Well the sector is whatever you like. It must be a sector defined in your map and then you can use that to position your entity.
Quote
Is there antway to show the entity that has no 'camera'?
Yes, using pcmesh.
Greetings,
Logged
Pages:
[
1
]
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Crystal Space Development
-----------------------------
=> General Crystal Space Discussion
=> Support
-----------------------------
Crystal Space Project Development
-----------------------------
=> Feature Requests
=> Plugins
=> Bug Reports
-----------------------------
Crystal Space Development
-----------------------------
=> Game Content Creation
-----------------------------
Miscellaneous
-----------------------------
=> Article/Tutorial Requests
=> Article/Tutorial Discussion
-----------------------------
Crystal Space Project Development
-----------------------------
=> Development Discussion
-----------------------------
Crystal Space Projects
-----------------------------
=> Project Discussion
=> WIP Projects
=> Finished Projects
-----------------------------
Associate Projects
-----------------------------
=> CEL Discussion
=> Crystal Core Discussion
=> CrystalBlend Discussion
-----------------------------
Crystal Space Project Development
-----------------------------
=> Google Summer of Code
-----------------------------
Associate Projects
-----------------------------
=> Apricot (Open Game)
=> Ares Project
Loading...