2 registered members (Martin_HH, TipmyPip),
1,279
guests, and 10
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: Entity-Darstellungsfehler! Hilfe!!!!
[Re: Timothy]
#207843
05/22/08 16:05
05/22/08 16:05
|
Joined: Jul 2007
Posts: 959 nl
flits
User
|
User
Joined: Jul 2007
Posts: 959
nl
|
try this one
function main() { level_load(""); wait(2); set(camera,CULL_CW);// and try NOCULL ...
and maby check if you didnt change arc and aspect of the camera and if that didnt work create a view and look if they are culled to
Last edited by flits; 05/22/08 16:09.
"empty"
|
|
|
Re: Entity-Darstellungsfehler! Hilfe!!!!
[Re: Oxy]
#207910
05/23/08 06:07
05/23/08 06:07
|
Joined: Oct 2007
Posts: 306 Austria
Alan
OP
Senior Member
|
OP
Senior Member
Joined: Oct 2007
Posts: 306
Austria
|
Good morning... what a nice day to fix some errors ^^ Yesterday I tried to write my own movement-code, unfortunately it didn't work properly, but what I saw was our special error considering transparency again. Today, I copied and pasted Geroge's movement code out of AUM 46 and modified it a bit. Everything considering transparency was thrown out of the code, therefore it looks like that now:
// testlevel2.wdl
var camera_distance = 0;
var camera_height = 0;
var camera_mode = 0;
sound step_wav = <step.wav>;
var temporary_distance = nullvector;
var distance_traced = 0;
function main()
{
level_load("testlevel2.wmb");
}
action player_action()
{
player = me; // Entity, die diese Aktion aufruft, wird als "Player" definiert.
my.skill40 = camera_distance; // Entity-interne Variable 40 soll der Kamera-Distanz entsprechen.
my.skill41 = camera_height; // Entity-interne Variable 41 soll der Kamera-Höhe entsprechen.
camera_mode = 3; // Standard-Ansicht soll 3rd-Person sein.
while(1) // ENDLOSSCHLEIFE
{
player.pan -= 10 * mouse_force.x * time -1.5 * (key_a - key_d); // dreht den Spieler wenn A oder D gedrückt oder Maus bewegt wird
camera.x = player.x - 20* camera_distance * cos(player.pan); // positioniert die Kamera.
camera.y = player.y - 20* camera_distance * sin(player.pan);
camera.z = player.z + camera_height* 0.8 * sin (my.skill46 * 3.6) + 20;
camera.pan = player.pan;
camera.tilt += 7 * mouse_force.y * time;
camera_distance = min(max(camera_distance, 5), 1000); // 5 < Kamera-Distanz < 500
if (key_w + key_s > 0) // W und S bewegen den Spieler vor oder zurück.
{
ent_cycle("walk", my.skill46); // Animation der Spieler-Entity.
my.skill46 += 10 * (1 + key_shift * 0.5) * time; // Animationsframe wird weitergeschaltet.
// Erhöhte Geschwindigkeit, wenn Shift gedrückt.
my.skill46 %= 100; // My.Skill56 mod 100. Beschränkung auf Werte 1-100.
}
else
{
ent_cycle("stand", my.skill48); // Animation der Spieler-Entity.
my.skill48 += 2 * time; // Gilt für die unbewegte Spieler-Entity.
my.skill48 %= 100;
}
vec_set(temp, my.x); // (temp.x|temp.y|temp.z) = (player.x|player.y|player.z)
temp.z -= 10000;
trace_mode = ignore_me + ignore_passable + use_box;
temp.z = -trace(my.x, temp);
temp.x = 10 * (key_w - key_s) * (1 + 1 * key_shift) * time;
temp.y = 0;
my.skill47 += ent_move(temp, nullvector); // ent_move liefert als Ergebnis die Distanz der Bewegung zurück.
if (my.skill 47 > 50) // ist die Distanz größer als 50 Quants...
{
snd_play(step_wav, 30, 0); // ... wird ein Schrittgeräusch abgespielt.
my.skill47 = 0;
}
wait(1);
}
}
And here's a screenshot of how it looks now: (If somebody can't see the screenshot please use the following link: http://www.letsshareit.net/files/view/5/tree.jpg) The cbabe-model looks normal again... strange, extremely strange, taking into consideration that I didn't play around with trasparency or alpha at all in my own code yesterday... But still - don't you thinkt that those trees look a bit odd? I know, in this picture they look normal, but when you move around them you get the feeling that you can see right through them and always see the "back" side of the tree... I don't know how to describe it in another way xD
|
|
|
Re: Entity-Darstellungsfehler! Hilfe!!!!
[Re: Alan]
#207942
05/23/08 12:09
05/23/08 12:09
|
Joined: Apr 2007
Posts: 141 Germany
Timothy
Member
|
Member
Joined: Apr 2007
Posts: 141
Germany
|
What did I say? This tree-problem is not a "mistake" of the engine. It's the alpha channel. I also saw it with loopix trees. But here I don't know how to fix it.
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|