1 registered members (AndrewAMD),
1,248
guests, and 6
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: Gamestudio 8.30.2 Public Beta
[Re: jcl]
#382961
09/14/11 15:02
09/14/11 15:02
|
Joined: Feb 2010
Posts: 320 TANA/Madagascar
3dgs_snake
Senior Member
|
Senior Member
Joined: Feb 2010
Posts: 320
TANA/Madagascar
|
Hi, I discovered that when changing the bounding box, it is needed to hide the shadow, wait 1 frame and show the shadow again for the shadow size to be updated. But I don't know if it is the correct way to use it.
reset(ent_player, SHADOW);
wait(1);
set(ent_player, SHADOW);
Sample code:
#include <acknex.h>
#include <default.c>
/////////////////////////////////////////////////////////////////////////////
// Decal shadow problem App
void main()
{
// Wait 1 frame
wait(1);
// Load empty level
level_load(NULL);
// Position camera
vec_set(camera.x,vector(-150,0,50));
// Create terrain
you = ent_createterrain(NULL,NULL,32,32,1000);
bmap_fill(bmap_for_entity(you,0), vector(60, 60, 60), 100);
// Create shadow casting entity
ENTITY *ent_player = ent_create(CUBE_MDL, vector(0, 0, 60), NULL);
c_setminmax(ent_player);
set(ent_player, SHADOW);
// Main loop
while(1)
{
// Morph entity into cube if UP key
if (key_cuu)
{
// Morph entity to cube
ent_morph(ent_player, CUBE_MDL);
// Scale cube
vec_set(ent_player->scale_x, vector(0.5, 0.5, 0.5));
//ent_player->min_x = -5;
//ent_player->max_x = 5;
reset(ent_player, SHADOW);
wait(1);
set(ent_player, SHADOW);
// Wait for key release
while(key_cuu)
{
wait(1);
}
}
// Morph entity to sphere if DOWN key
if (key_cud)
{
ent_morph(ent_player, SPHERE_MDL);
// scale sphere
vec_set(ent_player->scale_x, vector(2, 2, 2));
//ent_player->min_x = -20;
//ent_player->max_x = 20;
reset(ent_player, SHADOW);
wait(1);
set(ent_player, SHADOW);
// Wait for key release
while(key_cud)
{
wait(1);
}
}
DEBUG_VAR(ent_player->min_x, 100);
DEBUG_VAR(ent_player->max_x, 150);
// Wait 1 frame
wait(1);
}
}
/////////////////////////////////////////////////////////////////////////////
Best regards.
Last edited by 3dgs_snake; 09/14/11 15:03.
|
|
|
Re: Gamestudio 8.30.2 Public Beta
[Re: 3dgs_snake]
#382964
09/14/11 15:39
09/14/11 15:39
|
Joined: Dec 2008
Posts: 1,218 Germany
Rackscha
Serious User
|
Serious User
Joined: Dec 2008
Posts: 1,218
Germany
|
I discovered that when changing the bounding box, it is needed to hide the shadow, wait 1 frame and show the shadow again for the shadow size to be updated. But I don't know if it is the correct way to use it.
Anything that involves WAIT to work properly(within the same assumed time...while it isnt because of the wait) sounds bad. programm should be able to work without ANY wait o.O
MY Website with news of my projects: (for example my current Muliplayer Bomberman, GenesisPrecompiler for LiteC and TileMaster, an easy to use Tile editor) Sparetime-Development
|
|
|
Re: Gamestudio 8.30.2 Public Beta
[Re: sPlKe]
#383077
09/15/11 18:29
09/15/11 18:29
|
Joined: Jan 2004
Posts: 557 Wurzen, Deutschland
White_Wolf
User
|
User
Joined: Jan 2004
Posts: 557
Wurzen, Deutschland
|
Thanks for the update.
Under About Wed is shwon the wrong 3DGS Version (6.20), when i start a level, in the Starting Window, it shows the right Version (6.30.2).
by
White_Wolf
A8 Com Version 8.40 Win 7 64 Bit
|
|
|
|