Jump to content

SetWorldCullRange()


Gilmer
 Share

Recommended Posts

Why I use the SetWorldCullRange(), my program is crash? I update all files, and continue with StackOverflow..

Im still with the problem with "auto hide models", and i think that this function, will solve my problem, but donk cant use. Are something worng im my code?

 

2rgytlt.jpg

 

 

//	====================================================================
//	This file was generated by Leadwerks C++/LEO/BlitzMax Project Wizard
//	Written by Rimfrost Software
//	http://www.rimfrost.com 
//	====================================================================

#include "engine.h"

int main( int argn, char* argv[] )
{

//Resolution
int width=800,height=600;

Initialize() ;
RegisterAbstractPath("D:/Projetos/Rally");
SetAppTitle( "Rally" ) ;
Graphics( width, height ) ;
AFilter() ;
TFilter() ;

// Cria FrameWork
TFramework framework=CreateFramework();
// Pega Layer da Camera main
TLayer layer = GetFrameworkLayer(0);
// Pega Camera principal(main)
TCamera camera=GetLayerCamera(layer);

// CONFIGURA O CENARIO ##################
//Camera
PositionEntity(camera,Vec3(-818,19,832));
SetWorldCullRange(50,125,500);


TVec3 camrotation=Vec3(0);
float mx=0,my=0;
float move=0,strafe=0.0;


// Game loop
while( !KeyHit() && !AppTerminate() )
{
	if( !AppSuspended() ) // We are not in focus!
	{
		//FREE LOOK
		mx = Curve(MouseX()-GraphicsWidth()/2, mx,6);
           my = Curve(MouseY()-GraphicsHeight()/2, my,6);
           MoveMouse(GraphicsWidth()/2, GraphicsHeight()/2);               
           camrotation.X = camrotation.X+my/10.0;
           camrotation.Y = camrotation.Y-mx/10.0;
           RotateEntity(camera, camrotation);

		//MOVE CAMERA
		move   = Curve(KeyDown(KEY_W)-KeyDown(KEY_S),move,10);
		strafe = Curve(KeyDown(KEY_D)-KeyDown(KEY_A),strafe,10);
		MoveEntity(camera,Vec3(strafe,0,move));


		// Update timing and world
		UpdateAppTime();
		UpdateWorld(AppSpeed()) ;

		// Render
		UpdateFramework();
		RenderFramework();

		// Send to screen
		Flip(0) ;
	}
}

// Done
return Terminate() ;
}



 

 

thanks

Link to comment
Share on other sites

This function raises stack overflow for me too. The info on the wiki has been added from Lumooja but no examples given, is it an undocumented function/next feature? I remember Lumooja said that such function should be done before or after.

 

Have you tried using "EntityViewRange(scene, VIEWRANGE_INFINITE, 1)" having other models in the scene which are not those which give you the issue? It's strange because it works for me in a sample scene with a house.

?? FRANCESCO CROCETTI ??

http://skaredcreations.com

Link to comment
Share on other sites

Yes ZioRed, I have tried this, but the problem continue =/

I have tried model by model..

 

I seems to be a bug in the engine.dll, only Josh can fix it.

cool this, because now I depend this, for test the game out editor. The Josh have a preview to when will fix it?

Link to comment
Share on other sites

I think The Josh will fix it very soon, since it's an easy fix and quite important too. Not sure if I will need to make a bug report also, since it crashes always.

Ryzen 9 RX 6800M ■ 16GB XF8 Windows 11 ■
Ultra ■ LE 2.53DWS 5.6  Reaper ■ C/C++ C# ■ Fortran 2008 ■ Story ■
■ Homepage: https://canardia.com ■

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...